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

JavaScript-Developer-I Exam Dumps - Salesforce Certified JavaScript Developer (JS-Dev-101)

Searching for workable clues to ace the Salesforce JavaScript-Developer-I Exam? You’re on the right place! ExamCert has realistic, trusted and authentic exam prep tools to help you achieve your desired credential. ExamCert’s JavaScript-Developer-I PDF Study Guide, Testing Engine and Exam Dumps follow a reliable exam preparation strategy, providing you the most relevant and updated study material that is crafted in an easy to learn format of questions and answers. ExamCert’s study tools aim at simplifying all complex and confusing concepts of the exam and introduce you to the real exam scenario and practice it with the help of its testing engine and real exam dumps

Go to page:
Question # 17

Refer to the code below:

01 let sayHello = () = > {

02 console.log( ' Hello, World! ' );

03 };

Which code executes sayHello once , two minutes from now?

A.

delay(sayHello, 120000);

B.

setTimeout(sayHello, 120000);

C.

setTimeout(sayHello(), 120000);

D.

setInterval(sayHello, 120000);

Full Access
Question # 18

Which two code snippets show working examples of a recursive function?

A.

const sumToTen = numVar = > {

if (numVar < 0)

return;

return sumToTen(numVar + 1);

};

B.

function factorial(numVar) {

if (numVar < 0) return;

if (numVar === 0) return 1;

return numVar - 1;

}

C.

const factorial = numVar = > {

if (numVar < 0) return;

if (numVar === 0) return 1;

return numVar * factorial(numVar - 1);

};

D.

let countingDown = function(startNumber) {

if (startNumber > 0) {

console.log(startNumber);

return countingDown(startNumber - 1);

} else {

return startNumber;

}

};

(Note: Option D is shown here with corrected syntax: lowercase return and matching parentheses.)

Full Access
Question # 19

A developer has an isDeg function that takes one argument, pts. They want to schedule the function to run every minute.

What is the correct syntax for scheduling this function?

A.

setInterval(isDeg( ' cat ' ), 60000);

B.

setInterval(isDeg, 60000, ' cat ' );

C.

setTimeout(isDeg, 60000, ' cat ' );

D.

setTimeout(isDeg( ' cat ' ), 60000);

Full Access
Question # 20

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.

setTimeout(function() {

try {

countSheep();

} catch (e) {

handleError(e);

}

}, 1000);

B.

try {

countSheep();

} finally {

handleError(e);

}

C.

try {

countSheep();

} handleError (e){

catch(e);

}

D.

try {

setTimeout(function() {

countSheep();

}, 1000);

} catch (e) {

handleError(e);

}

Full Access
Question # 21

Refer to the code below:

const searchText = ' Yay! Salesforce is amazing! ' ;

let result1 = searchText.search(/sales/i);

let result2 = searchText.search(/sales/);

console.log(result1);

console.log(result2);

After running this code, which result is displayed on the console?

A.

5

undefined

B.

5

0

C.

true

false

D.

5

-1

Full Access
Question # 22

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);

}

Full Access
Question # 23

Refer to the code:

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

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

03 let car2 = new Promise(resolve = >

04 setTimeout(resolve, 1500, " Car 2 completed " ));

05 let car3 = new Promise(resolve = >

06 setTimeout(resolve, 3000, " Car 3 completed " ));

07

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

09 .then(value = > {

10 let result = ' $(value) the race. ' ;

11 })

12 .catch(err = > {

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

14 });

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

A.

Car 2 completed the race.

B.

Car 3 completed the race.

C.

Race is cancelled.

D.

Car 1 crashed in the race.

Full Access
Question # 24

Console logging methods that allow string substitution:

A.

message

B.

log

C.

assert

D.

info

E.

error

Full Access
Go to page: