Salesforce Certified JavaScript Developer I Exam Practice Test

Page: 1 / 14
Total 224 questions

Question 1

A test has a dependency on database. query. During the test, the dependency is replaced with an object called database with the method,

Calculator query, that returns an array. The developer does not need to verify how many times the method has been called.

Which two test approaches describe the requirement?

Choose 2 answers



Answer : A, D

Question 2

Given the following code:

is the output of line 02?



Answer : C

Question 3

Which statement parses successfully?



Answer : A

Question 4

A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the

function to run once after five seconds.

What is the correct syntax to schedule this function?



Answer : D

Question 5

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?

A)

B)

C)

D)



Answer : A

Question 6

Given the following code:

document.body.addEventListener(' click ', (event) => {

if (/* CODE REPLACEMENT HERE */) {

console.log('button clicked!');

)

});

Which replacement for the conditional statement on line 02 allows a developer to

correctly determine that a button on page is clicked?



Answer : C

Question 7

Given the following code:

document.body.addEventListener(' click ', (event) => {

if (/* CODE REPLACEMENT HERE */) {

console.log('button clicked!');

)

});

Which replacement for the conditional statement on line 02 allows a developer to

correctly determine that a button on page is clicked?



Answer : C

Page:    1 / 14   
Total 224 questions