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

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. The test passes:

01 let res = sum3([1, 2, 3]);

02 console.assert(res === 6);

03

04 res = sum3([1, 2, 3, 4]);

05 console.assert(res === 6);

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

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

A.

The line 02 assertion fails.

B.

The line 05 assertion passes.

C.

The line 05 assertion fails.

D.

The line 02 assertion passes.

Full Access
Question # 10

Refer to the code below:

01 const addBy = ?

02 const addByEight = addBy(8);

03 const sum = addByEight(50);

Which two functions can replace line 01 and return 58 to sum?

A.

const addBy = function(num1) {

return function(num2) {

return num1 + num2;

}

}

B.

const addBy = function(num1) {

return num1 * num2;

}

C.

const addBy = (num1) = > num1 + num2;

D.

(Corrected for typing errors)

const addBy = (num1) = > {

return function(num2) {

return num1 + num2;

}

}

Full Access
Question # 11

01 function changeValue(obj) {

02 obj.value = obj.value / 2;

03 }

04 const objA = {value: 10};

05 const objB = objA;

06

07 changeValue(objB);

08 const result = objA.value;

What is the value of result after the code executes?

A.

low

B.

10

C.

5

D.

undefined

Full Access
Question # 12

Given the code below:

01 function Person() {

02 this.firstName = ' John ' ;

03 }

04

05 Person.proto = {

06 job: x = > ' Developer '

07 });

08

09 const myFather = new Person();

10 const result = myFather.firstName + ' ' + myFather.job();

What is the value of result when line 10 executes?

A.

Error: myFather.job is not a function

B.

undefined Developer

C.

John Developer

D.

John undefined

Full Access
Question # 13

A class was written to represent items for purchase in an online store, and a second class representing items that are on sale at a discounted price. The constructor sets the name to the first value passed in. There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.

01 let regItem = new Item( ' Scarf ' , 55);

02 let saleItem = new SaleItem( ' Shirt ' , 80, .1);

03 Item.prototype.description = function() { return ' This is a ' + this.name; }

04 console.log(regItem.description());

05 console.log(saleItem.description());

06

07 SaleItem.prototype.description = function() { return ' This is a discounted ' + this.name; }

What is the output when executing the code above?

A.

This is a Scarf

Uncaught TypeError: saleItem.description is not a function

This is a Scarf

This is a discounted Shirt

B.

This is a Scarf

This is a Shirt

This is a Scarf

This is a discounted Shirt

C.

This is a Scarf

This is a Shirt

This is a discounted Scarf

This is a discounted Shirt

D.

This is a Scarf

Uncaught TypeError: saleItem.description is not a function

This is a Shirt

This is a discounted Shirt

Full Access
Question # 14

A Node.js server library uses events and callbacks. The developer wants to log any issues the server has at boot time.

Which code logs an error with an event?

A.

server.catch( ' error) = > {

console.log( ' ERROR ' , error);

});

B.

server.error( ' error) = > {

console.log( ' ERROR ' , error);

});

C.

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

console.log( ' ERROR ' , error);

});

D.

try {

server.start();

} catch(error) {

console.log( ' ERROR ' , error);

}

Full Access
Question # 15

Refer to the code below:

01 const objBook = {

02 title: ' JavaScript ' ,

03 };

04 Object.preventExtensions(objBook);

05 const newObjBook = objBook;

06 newObjBook.author = ' Robert ' ;

What are the values of objBook and newObjBook respectively?

A.

{ title: " JavaScript " }

{ title: " JavaScript " }

B.

{ author: " Robert " , title: " JavaScript " }

undefined

C.

{ author: " Robert " }

{ author: " Robert " , title: " JavaScript " }

D.

{ author: " Robert " , title: " JavaScript " }

{ author: " Robert " , title: " JavaScript " }

Full Access
Question # 16

Value of:

true + 3 + ' 100 ' + null

A.

" 4100null "

B.

104

C.

" 4100 "

D.

" 2200null "

Full Access
Go to page: