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 # 25

A test searches for:

< button class= " blue " > Checkout < /button >

But the actual HTML is:

< button > Checkout < /button >

The test fails because it expects a class that no longer exists.

What type of test outcome is this?

A.

False negative

B.

True positive

C.

True negative

D.

False positive

Full Access
Question # 26

Refer to the following code block:

01 let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];

02 let output = 0;

03

04 for (let num of array) {

05 if (output > 10) {

06 break;

07 }

08 if (num % 2 == 0) {

09 continue;

10 }

11 output += num;

12 }

What is the value of output after the code executes?

A.

16

B.

25

C.

11

D.

36

Full Access
Question # 27

Code:

01 const sayHello = (name) = > {

02 console.log( ' Hello ' , name);

03 };

04

05 const world = () = > {

06 return ' World ' ;

07 };

08

09 sayHello(world);

This does not print " Hello World " .

What change is needed?

A.

Change line 2 to console.log( ' Hello ' , name());

B.

Change line 7 to }();

C.

Change line 9 to sayHello(world)();

D.

Change line 5 to function world() {

Full Access
Question # 28

A developer is setting up a new Node.js server with a client library that is built using events and callbacks.

The library:

    Will establish a web socket connection and handle receipt of messages to the server.

    Will be imported with require, and made available with a variable called ws.

    The developer also wants to add error logging if a connection fails.

Given this information, which code segment shows the correct way to set up a client with two events that listen at execution time?

A.

ws.connect(() = > {

console.log( ' Connected to client ' );

}).catch((error) = > {

console.log( ' ERROR ' , error);

});

B.

ws.on( ' connect ' , () = > {

console.log( ' Connected to client ' );

});

ws.on( ' error ' , (error) = > {

console.log( ' ERROR ' , error);

});

C.

ws.on( ' connect ' , () = > {

console.log( ' Connected to client ' );

});

ws.on( ' error ' , (error) = > {

console.log( ' ERROR ' , error);

});

D.

try {

ws.connect(() = > {

console.log( ' Connected to client ' );

});

} catch(error) {

console.log( ' ERROR ' , error);

}

Full Access
Question # 29

Refer to the following code (correcting the missing template literal backticks):

let codeName = ' Bond ' ;

let sampleText = `The name is ${codeName}, Jim ${codeName}`;

A developer is trying to determine if a certain substring is part of a string.

Which three code statements return true?

A.

sampleText.includes( ' Jim ' );

B.

sampleText.includes( ' The ' , 1);

C.

sampleText.includes( ' Jim ' , 4);

D.

sampleText.indexOf( ' Bond ' ) !== -1;

E.

sampleText.substring( ' Jim ' );

Full Access
Question # 30

Refer to the code below:

< html >

< body >

< div id= " logo " > Hello Logo! < /div >

< button id= " test " > Click me < /button >

< /body >

< script >

function printMessage(event) {

console.log( ' This is a test message ' );

}

let el = document.getElementById( ' test ' );

el.addEventListener( " click " , printMessage, false);

< /script >

< /html >

Which action should be done?

A.

Add event.removeEventListener(); to window.onload event handler

B.

Add event.removeEventListener(); to printMessage function

C.

Add event.stopPropagation(); to printMessage function

D.

Add event.stopPropagation(); to window.onload event handler

Full Access
Question # 31

Refer to the code:

const pi = 3.1415926;

What is the data type of pi?

A.

Float

B.

Double

C.

Decimal

D.

Number

Full Access
Question # 32

Refer to the code below:

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

02 const fraction = Math.random();

03 if (fraction > 0.5) reject( ' fraction > 0.5, ' + fraction);

04 resolve(fraction);

05 })

06 .then(() = > console.log( ' resolved ' ))

07 .catch((error) = > console.error(error))

08 .finally(() = > console.log( ' when am I called? ' ));

When does Promise.finally on line 08 get called?

A.

When rejected

B.

When resolved and settled

C.

When resolved

D.

When resolved or rejected

Full Access
Go to page: