Salesforce Certified JavaScript Developer (JS-Dev-101) Exam Practice Test

Page: 1 / 14
Total 219 questions
Question 1

At Universal Containers, every team has its own way of copying JavaScript objects. The

code

Snippet shows an implementation from one team:

Function Person() {

this.firstName = ''John'';

this.lastName = 'Doe';

This.name =() => (

console.log('Hello $(this.firstName) $(this.firstName)');

)}

Const john = new Person ();

Const dan =JSON.parse(JSON.stringify(john));

dan.firstName ='Dan';

dan.name();

What is the Output of the code execution?



Answer : C


Question 2

Refer to the code below:

let timeFunction =() => {

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

};

let timerId = setTimeout (timedFunction, 1000);

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



Answer : C


Question 3

A developer has the following array of hourly wages:

Let arr = (8, 5, 9, 75, 11, 25, 7, 75, , 13, 25);

For workers making less than $10 an hour rate should be multiple by 1.25 and returned in a new array.

How should the developer implement the request?



Answer : C


Question 4

Consider type coercion, what does the following expression evaluate to?

True + 3 + '100' + null



Answer : D


Question 5

A developer has the following array of student test grades:

Let arr = [ 7, 8, 5, 8, 9 ];

The Teacher wants to double each score and then see an array of the students

who scored more than 15 points.

How should thedeveloper implement the request?



Answer : C


Question 6

Considering type coercion, what does the following expression evaluate to?

True + '13' + NaN



Answer : D


Question 7

Refer of the string below:

Const str = 'sa;esforce'=;

Which two statement result in the word 'Sale'?

Choose 2 answers



Answer : A, B


Page:    1 / 14   
Total 219 questions