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

Page: 1 / 14
Total 219 questions
Question 1

Refer to the code below:

console.log(''start);

Promise.resolve('Success') .then(function(value){

console.log('Success');

});

console.log('End');

What is the output after the code executes successfully?



Answer : C


Question 2

Refer to the following code:

function test (val) {

If (val === undefined) {

return 'Undefined values!' ;

}

if (val === null) {

return 'Null value! ';

}

return val;

}

Let x;

test(x);

What is returned by the function call on line 13?



Answer : C


Question 3

Given the following code:

Let x =null;

console.log(typeof x);

What is the output of the line 02?



Answer : C


Question 4

developer wants to use a module named universalContainersLib and them callfunctions

from it.

How should a developer import every function from the module and then call the functions foo

and bar ?



Answer : A


Question 5

Refer to the code below:

Let foodMenu1 = ['pizza', 'burger', 'French fries'];

Let finalMenu = foodMenu1;

finalMenu.push('Garlic bread');

What is the value of foodMenu1 after the code executes?



Answer : B


Question 6

Refer to HTML below:

The current status of an Order: In Progress

.

Which JavaScript statement changes thetext 'In Progress' to 'Completed' ?



Answer : C


Question 7

A developer creates a class that represents a blog post based on the requirement that a

Post should have a body author and view count.

The Code shown Below:

Class Post{

// Insert code here

This.body =body

This.author = author;

this.viewCount = viewCount;

}

}

Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set

to a new instanceof a Post with the three attributes correctly populated?



Answer : C


Page:    1 / 14   
Total 219 questions