Free JavaScript-Developer-I Questions for Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Exam as PDF & Practice Test Engine

  • Exam Code/Number: JavaScript-Developer-I
  • Exam Name/Title: Salesforce Certified JavaScript Developer (JS-Dev-101)
  • Certification Provider: Salesforce
  • Corresponding Certification: Salesforce Developer
  • Exam Questions: 149
  • Updated On: Jul 15, 2026
A developer copied a JavaScript object:
01 function Person() {
02 this.firstName = " John " ;
03 this.lastName = " Doe " ;
04 this.name = () = > `${this.firstName},${this.lastName}`;
05 }
06
07 const john = new Person();
08 const dan = Object.assign({}, john);
09 dan.firstName = ' Dan ' ;
How does the developer access dan ' s firstName, lastName?
Correct Answer: C Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given the following code:
01 counter = 0;
02 const logCounter = () = > {
03 console.log(counter);
04 };
05 logCounter();
06 setTimeout(logCounter, 2100);
07 setInterval(() = > {
08 counter++;
09 logCounter();
10 }, 1000);
What will be the first four numbers logged?
Correct Answer: D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Refer to the following code:
< html lang= " en " >
< body >
< button class= " secondary " > Save draft < /button >
< button class= " primary " > Save and close < /button >
< /body >
< script >
function displaySaveMessage(event) {
console.log( ' Save message. ' );
}
function displaySuccessMessage(event) {
console.log( ' Success message. ' );
}
window.onload = function() {
document.querySelector( ' .secondary ' )
.addEventListener( ' click ' , displaySaveMessage, true);
document.querySelector( ' .primary ' )
.addEventListener( ' click ' , displaySuccessMessage, true);
}
< /script >
< /html >
Correct Answer: A Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
A developer wants to use a try...catch statement to catch any error that countSheep() may throw and pass it to a handleError() function.
What is the correct implementation of the try...catch?
Correct Answer: D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Refer to the code below:
01 let o = {
02 get js() {
03 let city1 = String( ' St. Louis ' );
04 let city2 = String( ' New York ' );
05
06 return {
07 firstCity: city1.toLowerCase(),
08 secondCity: city2.toLowerCase(),
09 }
10 }
11 }
What value can a developer expect when referencing o.js.secondCity?
Correct Answer: A Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
A developer imports:
import printPrice from ' /path/PricePrettyPrint.js ' ;
What must be true about printPrice for this import to work?
Correct Answer: B Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Refer to the code declarations below:
let str1 = ' Java ' ;
let str2 = ' Script ' ;
Which three expressions return the string JavaScript?
Correct Answer: B,C,E Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
0
0
0
10