Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Salesforce Developer JavaScript-Developer-I Book

Salesforce Certified JavaScript Developer (JS-Dev-101) Questions and Answers

Question 33

Which statement accurately describes an aspect of promises?

Options:

A.

Arguments for the callback function passed to .then() are optional.

B.

.then() cannot be added after a catch.

C.

.then() manipulates and returns the original promise.

D.

In a .then() function, returning results is not necessary since callbacks will catch the result of a previous promise.

Question 34

Given the JavaScript below:

function onLoad() {

console.log( " Page has loaded! " );

}

Where can the developer see the log statement after loading the page in the browser?

Options:

A.

On the browser JavaScript console

B.

On the terminal console running the web server

C.

In the browser performance tools log

D.

On the webpage console log

Question 35

Given the HTML below:

< div >

< div id= " row-uc " > Universal Containers < /div >

< div id= " row-as " > Applied Shipping < /div >

< div id= " row-bt " > Burlington Textiles < /div >

< /div >

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

Options:

A.

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

B.

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

C.

document.querySelector( ' #row-as ' ).classes.push( ' priority-account ' );

D.

document.getElementById( ' row-as ' ).addClass( ' priority-account ' );

Question 36

A page loads 50+ < div class= " ad-library-item " > elements, all ads.

Developer wants to quickly and temporarily remove them.

Options:

Options:

A.

Use the browser console to execute a script that prevents the load event from firing.

B.

Use the DOM inspector to prevent the load event from firing.

C.

Use the browser console to execute a script that removes all elements containing the class ad-library-item.

D.

Use the DOM inspector to remove all elements containing the class ad-library-item.