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 13 hours ago Total Questions : 217

The Salesforce Certified JavaScript Developer JS-Dev-101 content is now fully updated, with all current exam questions added 13 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 # 51

A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.

A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.

Which two results occur when running this test on the updated sum3 function?

Choose 2 answers

A.

The line 05 assertion passes.

B.

The line 02 assertion passes.

C.

The line 02 assertion fails.

D.

The line 05 assertion fails.

Question # 52

Refer to the code below?

Let searchString = ‘ look for this ’;

Which two options remove the whitespace from the beginning of searchString?

Choose 2 answers

A.

searchString.trimEnd();

B.

searchString.trimStart();

C.

trimStart(searchString);

D.

searchString.replace(/*\s\s*/, ‘’);

Question # 53

Refer to the code below:

Const resolveAfterMilliseconds = (ms) = > Promise.resolve (

setTimeout ((= > console.log(ms), ms ));

Const aPromise = await resolveAfterMilliseconds(500);

Const bPromise = await resolveAfterMilliseconds(500);

Await aPromise, wait bPromise;

What is the result of running line 05?

A.

aPromise and bPromise run sequentially.

B.

Neither aPromise or bPromise runs.

C.

aPromise and bPromise run in parallel.

D.

Only aPromise runs.

Question # 54

Given the code below:

const delay = async delay = > {

return new Promise((resolve,reject)= > {

console.log(1);

setTimeout(resolve,deleay);

});

};

const callDelay =async ()= > {

console.log(2);

const yup = await delay(1000);

console.log(3);

}

console.log(4);

callDelay();

console.log(5);

What is logged to the console?

A.

4 2 1 5 3

Question # 55

Refer tothe code below:

What is the value of result after line 10 executes?

A.

Error: myFather.job is not a function

B.

John Developer

C.

undefined Developer

D.

John undefined

Question # 56

Refer to the codebelow:

function foo () {

const a =2;

function bat() {

console.log(a);

}

return bar;

}

Why does the function bar have access to variable a ?

A.

Inner function’s scope

B.

Hoisting

C.

Outer function’s scope

D.

Prototype chain

Question # 57

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 fora button with

class= “blue”. The test fails because no such button is found.

Which type of test category describes this test?

A.

True positive

B.

True negative

C.

False positive

D.

False negative

Question # 58

Refer to the following code:

01 function Tiger(){

02this.Type = ‘Cat’;

03 this.size = ‘large’;

04 }

05

06 let tony = new Tiger();

07 tony.roar = () = > {

08 console.log(‘They\’re great1’);

09 };

10

11 function Lion(){

12 this.type = ‘Cat’;

13 this.size = ‘large’;

14 }

15

16 let leo = new Lion();

17 //Insertcode here

18 leo.roar();

Which two statements could be inserted at line 17 to enable the function call on line 18?

Choose 2 answers.

A.

Leo.roar = () = > { console.log(‘They\’re pretty good:’); };

B.

Object.assign(leo,Tiger);

C.

Object.assign(leo,tony);

D.

Leo.prototype.roar = () = > { console.log(‘They\’re pretty good:’); };

Question # 59

Refer to the string below.

Const str=’Salesforce’;

Which two statementsresults in the word ' Sales ' ?

Question # 60

Universal Containers (UC) notices that its application that allows users to search for

accounts makes a network request each time a key is pressed. This results in too many

requests for the server to handle.

● Address this problem, UC decides to implement a debounce function on string change

handler.

What are three key steps to implement this debounce function?

Choose 3 answers:

A.

If there is an existing setTimeout and the search string change, allow the existingsetTimeout to finish, and do not enqueue a new setTimeout.

B.

When thesearch string changes, enqueue the request within a setTimeout.

C.

Ensure that the network request has the property debounce set to true.

D.

If there is an existing setTimeout and the search string changes, cancel the existingsetTimeout using thepersisted timerId and replace it with a new setTimeout.

E.

Store the timeId of the setTimeout last enqueued by the search string change handle.

Go to page: