New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Selected JavaScript-Developer-I Salesforce Developer Questions Answers

Salesforce Certified JavaScript Developer I (SU24) Questions and Answers

Question 5

Which code statement below correctly persists an objects in local 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);

}

Question 6

Given the code below:

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

Question 7

Refer to HTML below:

This card is smaller.

The width and height of this card is determined by its

contents.

Which expression outputs the screen width of the element with the ID card-01?

Options:

A.

document.getElementById(‘ card-01 ’).getBoundingClientRest().width

B.

document.getElementById(‘ card-01 ’).style.width

C.

document.getElementById(‘ card-01 ’).width

D.

document.getElementById(‘ card-01 ’).innerHTML.lenght*e

Question 8

A developer is trying to handle an error within a function.

Which code segment shows the correct approach to handle an error without propagating it elsewhere?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D