Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Salesforce Certified JavaScript Developer (JS-Dev-101)

Last Update 4 hours ago Total Questions : 147

The Salesforce Certified JavaScript Developer (JS-Dev-101) content is now fully updated, with all current exam questions added 4 hours ago. Deciding to include JavaScript-Developer-I practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our JavaScript-Developer-I exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these JavaScript-Developer-I sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Salesforce Certified JavaScript Developer (JS-Dev-101) practice test comfortably within the allotted time.

Question # 21

A developer removes the HTML class attribute from the checkout button, so now it is simply:

< button > Checkout < /button >

There is a test to verify the existence of the checkout button, however it looks for a button with class= " blue " . The test fails because no such button is found.

Which type of test category describes this test?

A.

True negative

B.

True positive

C.

False negative

D.

False positive

Question # 22

Refer to the code below:

class Student {

constructor(name) {

this._name = name;

}

displayGrade() {

console.log(`${this._name} got 70% on test.`);

}

}

class GraduateStudent extends Student {

constructor(name) {

super(name);

this._name = " Graduate Student " + name;

}

displayGrade() {

console.log(`${this._name} got 100% on test.`);

}

}

let student = new GraduateStudent( " Jane " );

student.displayGrade();

What is the console output?

A.

Better student Jackie got 70% on test.

B.

Uncaught ReferenceError

C.

Graduate Student Jane got 100% on test.

D.

Jackie got 70% on test.

Question # 23

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?

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! ' ); };

Question # 24

A developer publishes a new version of a package with bug fixes but no breaking changes. The old version number was 2.1.1.

What should the new package version number be based on semantic versioning?

A.

2.1.2

B.

2.2.0

C.

2.2.1

D.

3.1.1

Question # 25

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

A.

value === Number.NaN

B.

value == NaN

C.

Object.is(value, NaN)

D.

value !== value

E.

Number.isNaN(value)

Question # 26

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?

A.

Car 3 completed the race.

B.

Car 2 completed the race.

C.

Race is cancelled.

D.

Car 1 crashed in the race.

Question # 27

Why does second have access to variable a?

A.

Inner function ' s scope

B.

Outer function ' s scope

C.

Prototype Chain

D.

Hoisting

Question # 28

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

Developer wants to quickly and temporarily remove them.

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.

Question # 29

let sampleText = " The quick brown fox jumps " ;

Which three expressions return true for a substring?

A.

sampleText.includes( ' fox ' );

B.

sampleText.indexOf( ' quick ' ) > -1;

C.

sampleText.indexOf( ' fox ' ) !== -1;

D.

sampleText.include( ' fox ' ) !== -1;

E.

sampleText.indexOf( ' Quick ' ) !== -1;

Question # 30

Correct implementation of try...catch for countsDeep():

A.

try {

countsDeep();

} handleError (e){

catch(e);

}

B.

setTimeout(function() {

try {

countsDeep();

} catch (e) {

handleError(e);

}

}, 1000);

C.

try {

setTimeout(function() {

countsDeep();

}, 1000);

} catch (e) {

handleError(e);

}

D.

try {

setTimeout(function() {

countsDeep();

}, 1000);

} catch (e) {

handleError(e);

}

Go to page: