Summer Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

JavaScript-Developer-I Exam Dumps - Salesforce Developer Questions and Answers

Question # 34

JavaScript:

01 function Tiger() {

02 this.type = ' Cat ' ;

03 this.size = ' large ' ;

04 }

05

06 let tony = new Tiger();

07 tony.roar = () = > {

08 console.log( ' They\ ' re great! ' );

09 };

10

11 function Lion() {

12 this.type = ' Cat ' ;

13 this.size = ' large ' ;

14 }

15

16 let leo = new Lion();

17 // Insert code here

18 leo.roar();

Which two statements could be inserted at line 17 to enable line 18?

Options:

A.

leo.roar = () = > { console.log( ' They\ ' re pretty good! ' ); };

B.

Object.assign(leo, tony);

C.

Object.assign(leo, Tiger);

D.

leo.prototype.roar = () = > { console.log( ' They\ ' re pretty good! ' ); };

Buy Now
Question # 35

Given the code:

const copy = JSON.stringify([new String( ' false ' ), new Boolean(false), undefined]);

What is the value of copy?

Options:

A.

' [ " false " , false, null] '

B.

' [false, {}] '

C.

' [ " false " , false, undefined] '

D.

' [ " false " , {}] '

Buy Now
Question # 36

for (let number = 2; number < = 5; number += 1) {

// faster code statement here

}

Which statement meets the requirements to log an error when the Boolean statement evaluates to false?

Options:

A.

console.classy(number + 2 === 0);

B.

assert(number + 2 === 0);

C.

console.assert(number + 2 === 0);

D.

console.error(number + 2 === 0);

Buy Now
Question # 37

Refer to the code below (corrected to use a template literal on line 08):

01 let car1 = new Promise((_, reject) = >

02 setTimeout(reject, 2000, " Car 1 crashed in " )

03 );

04 let car2 = new Promise(resolve = >

05 setTimeout(resolve, 1500, " Car 2 completed " )

06 );

07 let car3 = new Promise(resolve = >

08 setTimeout(resolve, 3000, " Car 3 completed " )

09 );

10

11 Promise.race([car1, car2, car3])

12 .then(value = > {

13 let result = `${value} the race.`;

14 })

15 .catch(err = > {

16 console.log( " Race is cancelled. " , err);

17 });

What is the value of result when Promise.race executes?

Options:

A.

Car 3 completed the race.

B.

Car 2 completed the race.

C.

Race is cancelled.

D.

Car 1 crashed in the race.

Buy Now
Question # 38

A page loads 50+ < div class= " ad-library-item " > elements, all ads.

Developer wants to quickly and temporarily remove them.

Options:

Options:

A.

Use the browser console to execute a script that prevents the load event from firing.

B.

Use the DOM inspector to prevent the load event from firing.

C.

Use the browser console to execute a script that removes all elements containing the class ad-library-item.

D.

Use the DOM inspector to remove all elements containing the class ad-library-item.

Buy Now
Question # 39

Given a value, which three options can a developer use to detect if the value is NaN?

Options:

A.

value === Number.NaN

B.

value == NaN

C.

Object.is(value, NaN)

D.

value !== value

E.

Number.isNaN(value)

Buy Now
Question # 40

A developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.

Which three benefits of Node.js can the developer use to persuade their manager?

Options:

A.

Executes server-side JavaScript code to avoid learning a new language.

B.

Performs a static analysis on code before execution to look for runtime errors.

C.

Uses non-blocking functionality for performant request handling.

D.

Ensures stability with one major release every few years.

E.

Installs with its own package manager to install and manage third-party libraries.

Buy Now
Question # 41

Refer to the code below:

01 let timedFunction = () = > {

02 console.log( ' Timer called. ' );

03 };

04

05 let timerId = setInterval(timedFunction, 1000);

Which statement allows a developer to cancel the scheduled timed function?

Options:

A.

clearInterval(timerId);

B.

removeInterval(timerId);

C.

removeInterval(timedFunction);

D.

clearInterval(timedFunction);

Buy Now
Question # 42

Refer to the code below:

01 function changeValue(param) {

02 param = 5;

03 }

04 let a = 10;

05 let b = a;

06

07 changeValue(b);

08 const result = a + ' - ' + b;

What is the value of result when the code executes?

Options:

A.

5-5

B.

5-10

C.

10-5

D.

10-10

Buy Now
Question # 43

A developer wants to catch any error that countSheep() may throw and pass it to handleError().

Which implementation is correct?

Options:

A.

try {

setTimeout(function() {

countSheep();

}, 1000);

}

catch (e) {

handleError(e);

}

B.

try {

countSheep();

} finally {

handleError(e);

}

C.

try {

countSheep();

} handleError(e) {

catch(e);

}

D.

setTimeout(function() {

try {

(Answer incomplete in option list.)

Buy Now
Exam Name: Salesforce Certified JavaScript Developer (JS-Dev-101)
Last Update: Jun 19, 2026
Questions: 147
JavaScript-Developer-I pdf

JavaScript-Developer-I PDF

$25.5  $84.99
JavaScript-Developer-I Engine

JavaScript-Developer-I Testing Engine

$28.5  $94.99
JavaScript-Developer-I PDF + Engine

JavaScript-Developer-I PDF + Testing Engine

$40.5  $134.99