Free Salesforce JavaScript-Developer-I Practice Test & Real Exam Questions

  • 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: Oct 08, 2026
Code:
01 let array = [1, 2, 3, 4, 4, 5, 4, 4];
02 for (let i = 0; i < array.length; i++) {
03 if (array[i] === 4) {
04 array.splice(i, 1);
05 i--;
06 }
07 }
What is the value of array after execution?
Correct Answer: A Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
A developer wants to advocate for a mature, well-supported web framework/library instead of a new one (Minimalist.js).
Which two should be recommended?
Correct Answer: A,C Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
A developer needs to debug a Node.js web server because a runtime error keeps occurring at one of the endpoints.
The developer wants to test the endpoint on a local machine and make the request against a local server to look at the behavior. In the source code, the server.js file will start the server. The developer wants to debug the Node.js server only using the terminal.
Which command can the developer use to open the CLI debugger in their current terminal window?
(With corrected typing errors: node_inspect # node inspect, node_start_inspect # node start inspect.)
Correct Answer: B Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
Which three actions can the code execute in the browser console?
Correct Answer: A,C,D Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
Refer to the code:
01 const exec = (item, delay) = >
02 new Promise(resolve = > setTimeout(() = > resolve(item), delay));
03
04 async function runParallel() {
05 const [result1, result2, result3] = await Promise.all(
06 [exec( ' x ' , ' 100 ' ), exec( ' y ' , ' 500 ' ), exec( ' z ' , ' 100 ' )]
07 );
08 return `parallel is done: ${result1}${result2}${result3}`;
09 }
Which two statements correctly execute runParallel()?
Correct Answer: A,B Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
Given the code below:
01 function Person() {
02 this.firstName = ' John ' ;
03 }
04
05 Person.proto = {
06 job: x = > ' Developer '
07 });
08
09 const myFather = new Person();
10 const result = myFather.firstName + ' ' + myFather.job();
What is the value of result when line 10 executes?
Correct Answer: A Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
A developer has a fizzbuzz function that, when passed in a number, returns the following:
* ' fizz ' if the number is divisible by 3.
* ' buzz ' if the number is divisible by 5.
* ' fizzbuzz ' if the number is divisible by both 3 and 5.
* Empty string ' ' if the number is divisible by neither 3 nor 5.
Which two test cases properly test scenarios for the fizzbuzz function?
Correct Answer: A,C Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
Refer to the following array:
let arr = [1, 2, 3, 4, 5];
Which two lines of code result in a second array, arr2, created such that arr2 is a reference to arr?
Correct Answer: A,D Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).