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

Salesforce Developer JavaScript-Developer-I Full Course Free

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

Question 41

Given a value, which two options can a developer use to detect if the value is NaN?

Options:

A.

value === Number.NaN

B.

value == NaN

C.

isNaN(value)

D.

Object.is(value, NaN)

Question 42

Given a value, which three options can a developer use to detect if the value is NaN?

Options:

A.

value === Number.NaN

B.

value == NaN

C.

Object.is(value, NaN)

D.

value !== value

E.

Number.isNaN(value)

Question 43

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.

__filename

B.

window.location

C.

this.path

D.

__dirname

Question 44

Which two implementations of utils.js support foo and bar?

Options:

A.

const foo = () = > { return ' foo ' ; };

const bar = () = > { return ' bar ' ; };

export { foo, bar };

B.

const foo = () = > { return ' foo ' ; };

const bar = () = > { return ' bar ' ; };

export default { foo, bar };

C.

import { foo, bar } from " ./helpers/utils.js " ;

export { foo, bar };

D.

export default class {

foo() { return ' foo ' ; }

bar() { return ' bar ' ; }

}