Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

JavaScript-Developer-I Leak Questions

Salesforce Certified JavaScript Developer I (SP23) Questions and Answers

Question 25

A developer creates an object where its properties should be immutable and prevent

properties from being added or modified.

Which method should be used to execute this business requirement ?

Options:

A.

Object.const()

B.

Object.eval()

C.

Object.lock()

D.

Object.freeze()

Question 26

A developer has an ErrorHandler module that contains multiple functions.

What kind of export should be leveraged so that multiple functions can be used?

Options:

A.

all

B.

named

C.

multi

D.

default

Question 27

Refer to code below:

Let a =’a’;

Let b;

// b = a;

console.log(b);

What is displayed when the code executes?

Options:

A.

ReferenceError: b is not defined

B.

A

C.

Undefined

D.

Null

Question 28

A developer writes the code below to return a message to a user attempting to register a new username. If the username is available, a variable named nag is declared and assigned a value on line 03.

What is the value of msg when getAvailableabilityMessage (“newUserName”) is executed and get Availability (“newUserName”) returns true?

Options:

A.

"msg is not defined"

B.

"newUserName"

C.

"User-name available"

D.

undefined