Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Salesforce Developer JavaScript-Developer-I Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam JavaScript-Developer-I Premium Access

View all detail and faqs for the JavaScript-Developer-I exam


723 Students Passed

91% Average Score

94% Same Questions
Viewing page 3 out of 5 pages
Viewing questions 21-30 out of questions
Questions # 21:

Given the code below:

Question # 21

What is logged to the console'

Options:

A.

1 2 3 4 5

B.

1 2 5 3 4

C.

2 5 1 3 4

D.

2 5 3 4 1

Questions # 22:

A developer tries to retrieve all cookies, then sets a certain key value pair in the cookie. These statements are used:

Question # 22

What is the behavior?

Options:

A.

Cookies are read, but the key value is not set because the value is not URL encoded.

B.

Cookies are not read because line 01 should be document, cookies, but the key value is set and all cookies are wiped.

C.

A Cookies are read andthe key value is set, the remaining cookies are unaffected.

D.

Cookies are read and the key value is set, and all cookies are wiped.

Questions # 23:

Refer to the followingcode:

class Vehicle{

constructor(plate){

this.plate = plate;

}

}

class Truck extends Vehicle{

constructor(plate, weight){

//Missing code

this.weight = weight;

}

displayWeight(){

console.log(`The truck ${this.plate} has a weight of ${this.weight}lb.`);

}

}let myTruck = new Truck('123Ab',5000);

myTruck.displayWeight();

Which statement should be added to missing code for the code to display 'The truck 123AB has a

weight of 5000lb.

Options:

A.

super(plate)

B.

super.plate = plate

C.

Vehicle.plate = plate

D.

this.plate= plate

Questions # 24:

Given the code below:

Which three code segments result in a correct conversion from number to string? Choose 3 answers

Options:

A.

let strValue = numValue. toString();

B.

let strValue = * * 4 numValue;

C.

let strValue = numValue.toText ();

D.

let scrValue = String(numValue);

E.

let strValue = (String)numValue;

Questions # 25:

Given the HTML below:

Question # 25

Which statement adds the priority-account css class to the Applied Shipping row?

Options:

A.

document.querySelector('#row-as').classList.add('priority-account');

Questions # 26:

Which code statement below correctly persists an objects inlocal Storage ?

Options:

A.

const setLocalStorage = (storageKey, jsObject) => {window.localStorage.setItem(storageKey, JSON.stringify(jsObject));}

B.

const setLocalStorage = ( jsObject) => {window.localStorage.connectObject(jsObject));}

C.

const setLocalStorage= ( jsObject) => {window.localStorage.setItem(jsObject);}

D.

const setLocalStorage = (storageKey, jsObject) => {window.localStorage.persist(storageKey, jsObject);}

Questions # 27:

A developer writes the code below to calculate the factorial of a given number

function sum(number){

return number * sum(number-1);

}

sum(3);

what is the result of executing the code.

Options:

A.

0

B.

6

C.

Error

D.

-Infinity

Questions # 28:

Given the JavaScript below:

01 function filterDOM (searchString) {

02 const parsedSearchString = searchString && searchString.toLowerCase() ;

03 document.quesrySelectorAll(‘ .account’ ) . forEach(account => (

04 const accountName = account.innerHTML.toLOwerCase();

05 account. Style.display = accountName.includes(parsedSearchString) ? /*Insert

code*/;

06 )};

07 }

Which code should replace the placeholder comment on line 05 to hide accounts that do

not match thesearch string?

Options:

A.

‘ name ’ : ‘ block ’

B.

‘ Block ’ : ‘ none ’

C.

‘ visible ’ : ‘ hidden ’

D.

‘ hidden ’ : ‘ visible ’

Questions # 29:

Refer to code below:

Const objBook = {

Title: ‘Javascript’,

};

Object.preventExtensions(objBook);

Const newObjBook = objBook;

newObjectBook.author =‘Robert’;

What are the values of objBook and newObjBook respectively ?

Options:

A.

[title: “javaScript”] [title: “javaScript”]

B.

{author: “Robert”, title: “javaScript}Undefined

C.

{author: “Robert”, title: “javaScript}{author: “Robert”, title: “javaScript}

D.

{author: “Robert”}{author: “Robert”, title: “javaScript}

Questions # 30:

There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..

Question # 30

What is the output when executing the code above

Options:

A.

50Uncaught TypeError: saleItem,desrcription is not a function5080

B.

50805072

C.

508072

D.

5080Uncaught ReferenceError:this,discount is undefined72

Viewing page 3 out of 5 pages
Viewing questions 21-30 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.