Last Updated On : 29-Jun-2026


Salesforce Certified JavaScript Developer - JS-Dev-101 Practice Test

Prepare with our free Salesforce Certified JavaScript Developer - JS-Dev-101 sample questions and pass with confidence. Our Salesforce-JavaScript-Developer practice test is designed to help you succeed on exam day.

271 Questions
Salesforce 2026

Code:

01 const sayHello = (name) = > {

02 console.log( ' Hello ' , name);

03 };

04

05 const world = () = > {

06 return ' World ' ;

07 };

08

09 sayHello(world);

This does not print " Hello World " .

What change is needed?

A. Change line 2 to console.log( ' Hello ' , name());

B. Change line 7 to }();

C. Change line 9 to sayHello(world)();

D. Change line 5 to function world() {

A.   Change line 2 to console.log( ' Hello ' , name());

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?

A. React

B. Koa

C. Vue

D. Express

A.   React
C.   Vue

Refer to the following code (correcting the missing template literal backticks):

let codeName = ' Bond ' ;

let sampleText = `The name is ${codeName}, Jim ${codeName}`;

A developer is trying to determine if a certain substring is part of a string.

Which three code statements return true?

A. sampleText.includes( ' Jim ' );

B. sampleText.includes( ' The ' , 1);

C. sampleText.includes( ' Jim ' , 4);

D. sampleText.indexOf( ' Bond ' ) !== -1;

E. sampleText.substring( ' Jim ' );

A.   sampleText.includes( ' Jim ' );
C.   sampleText.includes( ' Jim ' , 4);
D.   sampleText.indexOf( ' Bond ' ) !== -1;

Refer to the following code block (with corrected template literals using backticks):

01 class Animal {

02 constructor(name) {

03 this.name = name;

04 }

05

06 makeSound() {

07 console.log(`${this.name} is making a sound.`);

08 }

09 }

10

11 class Dog extends Animal {

12 constructor(name) {

13 super(name);

14 this.name = name;

15 }

16 makeSound() {

17 console.log(`${this.name} is barking.`);

18 }

19 }

20

21 let myDog = new Dog( ' Puppy ' );

22 myDog.makeSound();

What is the console output?

A. > Uncaught ReferenceError

B. > Undefined

C. > Puppy is barking.

C.   > Puppy is barking.

Most accurate tests for:

const arr = Array(5).fill(0);

A. console.assert(arr.length === 0);

B. console.assert(arr[5] === 0 & & arr.length === 0);

C. arr.forEach(e = > console.assert(e === 0));

D. console.assert(arr.length === 5);

C.   arr.forEach(e = > console.assert(e === 0));
D.   console.assert(arr.length === 5);

Salesforce-JavaScript-Developer Exam Questions - Home Previous
Page 5 out of 55 Pages