Salesforce Developers

Salesforce Javascript-Developer-I Practice Test & Study Guide

Salesforce Certified JavaScript Developer (JS-Dev-101)

Exam code
Javascript-Developer-I
Questions
147
Updated
25 Nov 2026

What's in the Javascript-Developer-I study guide

  • 147practice questions with answers
  • PDFread and print on any device
  • Test enginepractice and exam modes online
  • 90 daysof free updates
  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email

Price$45

Choose a format

Prices in USD. Downloads appear in My Account once your order is complete.

  • Instant access from My Account after payment
  • 90 days of free updates
  • Money-back guarantee – see conditions
  • Help by live chat or email
Free demo

Javascript-Developer-I sample questions

Check the style and quality of the material before you buy.

Question 1

A developer wants to define a function log to be used a few times on a single-fileJavaScript script.01 // Line 1 replacement02 console.log('"LOG:', logInput);03 }Which two options can correctly replace line 01 and declare the function for use?Choose 2 answers

  • A. function leg(logInput) {
  • B. const log(loginInput) {
  • C. const log = (logInput) => {
  • D. function log = (logInput) {

Answer: A,C

Question 2

A developer wants to create an object from a function in the browser using the codebelow:Function Monster() { this.name =‘hello’ };Const z = Monster();What happens due to lack of the new keyword on line 02?

  • A. The z variable is assigned the correct object.
  • B. The z variable is assigned the correct object but this.name remains undefined.
  • C. Window.name is assigned to ‘hello’ and the variable z remains undefined.
  • D. Window.m is assigned the correct object.

Answer: C

Question 3

A developer uses a parsed JSON string to work with userinformation as in the block below:01 const userInformation ={02 “ id ” : “user-01”,03 “email” : “[email protected]”,04 “age” : 25Which two options access the email attribute in the object?Choose 2 answers

  • A. userInformation(“email”)
  • B. userInformation.get(“email”)
  • C. userInformation.email
  • D. userInformation(email)

Answer: A,C

Question 4

Considering type coercion, what does the following expression evaluate to?True + ‘13’ + NaN

  • A. ‘ 113Nan ’
  • B. 14
  • C. ‘ true13 ’
  • D. ‘ true13NaN ’

Answer: D

Question 5

A developer creates a class that represents a blog post based on the requirement that aPost should have a body author and view count.The Code shown Below:ClassPost {// Insert code hereThis.body =bodyThis.author = author;this.viewCount = viewCount;}}Which statement should be inserted in the placeholder on line 02 to allow for a variable tobe setto a new instanceof a Post with the three attributes correctly populated?

  • A. super (body, author, viewCount) {
  • B. Function Post (body, author, viewCount) {
  • C. constructor (body, author, viewCount) {
  • D. constructor() {

Answer: C

Question 6

Refer to the code below:Let foodMenu1 =[‘pizza’, ‘burger’, ‘French fries’];Let finalMenu = foodMenu1;finalMenu.push(‘Garlic bread’);What is the value of foodMenu1 after the code executes?

  • A. [ ‘pizza’,’Burger’, ‘French fires’, ‘Garlic bread’]
  • B. [ ‘pizza’,’Burger’, ‘French fires’]
  • C. [ ‘Garlic bread’ , ‘pizza’,’Burger’, ‘French fires’ ]
  • D. [ ‘Garlic bread’]

Answer: B

Question 7

Which three statements are true about promises ?Choose 3 answers

  • A. The executor of a new Promise runs automatically.
  • B. A Promise has a .then() method.
  • C. A fulfilled or rejected promise will not change states .
  • D. A settled promise can become resolved.
  • E. A pending promise canbecome fulfilled, settled, or rejected.

Answer: B,C,E

Question 8

A developer creates an object where its properties should be immutable and preventproperties from being added or modified.Which method shouldbe used to execute this business requirement ?

  • A. Object.const()
  • B. Object.eval()
  • C. Object.lock()
  • D. Object.freeze()

Answer: D

Question 9

Refer to the code below:const event = new CustomEvent(//Missing Code );obj.dispatchEvent(event);A developer needs to dispatch a custom event called update to send information aboutrecordId.Which two options could a developer insert at the placeholder in line 02 to achieve this?Choose 2 answers

  • A. ‘Update’ , (recordId : ‘123abc’(
  • B. ‘Update’ , ‘123abc’
  • C. { type : ‘update’, recordId : ‘123abc’ }
  • D. ‘Update’ , { Details : { recordId : ‘123abc’ } }

Answer: A,D

Question 10

A developer creates a simple webpage with an input field. When a user enters text in theinput field and clicks the button, the actual value of the field must be displayed in theconsole.Here is the HTML file content:<input type =” text” value=”Hello” name =”input”><button type =”button” >Display </button> The developer wrote the javascript code below:Const button= document.querySelector(‘button’);button.addEvenListener(‘click’, () => (Const input = document.querySelector(‘input’);console.log(input.getAttribute(‘value’));When the user clicks the button, the output is always “Hello”.What needs to be done to make this code work as expected?

  • A. Replace line 04 with console.log(input .value);
  • B. Replace line 03 with const input = document.getElementByName(‘input’);
  • C. Replace line 02 with button.addCallback(“click”, function() {
  • D. Replace line 02 withbutton.addEventListener(“onclick”, function() {

Answer: A

Why RealExamCollection is the best choice for Salesforce Javascript-Developer-I exam preparation

Secure your position in a competitive IT industry

The Salesforce Javascript-Developer-I certification is a strong way to demonstrate your understanding and ability. Our Javascript-Developer-I questions & answers help you prepare for it, so you can secure your current position and move your career forward.

Reviewed by IT professionals

We keep our Javascript-Developer-I practice questions up to date, with explanations. The questions and answers on RealExamCollection are reviewed by people with professional experience of Salesforce technologies.

One place to prepare

RealExamCollection brings together the material you need for the Salesforce Javascript-Developer-I exam. Explanations are added to the questions to help you understand the logic behind them and prepare for other Salesforce exams.

Updated Javascript-Developer-I questions & answers

We update the exam files regularly to add new questions. The date of the latest update is shown at the top of this page.

Free Javascript-Developer-I demo before you buy

You can view sample Javascript-Developer-I questions on this page before buying, to see the format and pattern of the material.

90 days of free updates

You are eligible for 90 days of free updates after buying the Javascript-Developer-I exam. If the file is updated in that time, you can download the latest version from your account.

Ready to prepare?

Salesforce Javascript-Developer-I · 147 questions

Choose a format