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

PDF JavaScript-Developer-I Study Guide

Salesforce Certified JavaScript Developer I (SU24) Questions and Answers

Question 17

Given the code below:

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?

Options:

A.

console.group(usersList) ;

B.

console.table(usersList) ;

C.

console.info(usersList) ;

D.

console.groupCol lapsed (usersList) ;

Question 18

A developer wants to iterate through an array of objects and count the objects and count

the objects whose property value, name, starts with the letter N.

Const arrObj = [{“name” : “Zach”} , {“name” : “Kate”},{“name” : “Alise”},{“name” : “Bob”},{“name” :

“Natham”},{“name” : “nathaniel”}

Refer to the code snippet below:

01 arrObj.reduce(( acc, curr) => {

02 //missing line 02

02 //missing line 03

04 ). 0);

Which missing lines 02 and 03 return the correct count?

Options:

A.

Const sum = curr.startsWith(‘N’) ? 1: 0;

Return acc +sum

B.

Const sum = curr.name.startsWith(‘N’) ? 1: 0;

Return acc +sum

C.

Const sum = curr.startsWIth(‘N’) ? 1: 0;

Return curr+ sum

D.

Const sum = curr.name.startsWIth(‘N’) ? 1: 0;

Return curr+ sum

Question 19

A developer is setting up a Node,js server and is creating a script at the root of the source code, index,js, that will start the server when executed. The developer declares a variable that needs the folder location that the code executes from.

Which global variable can be used in the script?

Options:

A.

window.location

B.

_filename

C.

_dirname

D.

this.path

Question 20

Given the following code:

Let x =null;

console.log(typeof x);

What is the output of the line 02?

Options:

A.

“Null”

B.

“X”

C.

“Object”

D.

“undefined”