Summer Sale Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple75

Pass the Salesforce Developer JavaScript-Developer-I Questions and answers with Dumpstech

Exam JavaScript-Developer-I Premium Access

View all detail and faqs for the JavaScript-Developer-I exam

Practice at least 50% of the questions to maximize your chances of passing.
Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions
Questions # 11:

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)

Questions # 12:

A team at Universal Containers works on a big project and uses Yarn to deal with the project’s dependencies. A developer added a dependency to manipulate dates and pushed the updates to the remote repository. The rest of the team complains that the dependency does not get downloaded when they execute yarn.

What could be the reason for this?

Options:

A.

The developer missed the option --add when adding the dependency.

B.

The developer added the dependency as a dev dependency, and NODE_ENV is set to production.

C.

The developer added the dependency as a dev dependency, and YARN_ENV is set to production.

D.

The developer missed the option --save when adding the dependency.

Questions # 13:

Function to test:

01 const sum3 = (arr) = > {

02 if (!arr.length) return 0;

03 if (arr.length === 1) return arr[0];

04 if (arr.length === 2) return arr[0] + arr[1] ;

05 return arr[0] + arr[1] + arr[2];

06 };

Which two assert statements are valid tests for this function?

Options:

A.

console.assert(sum3([1, ' 2 ' ]) == 12);

B.

console.assert(sum3([ ' hello ' , 2, 3, 4]) === NaN);

C.

console.assert(sum3([-3, 2]) === -1);

D.

console.assert(sum3([0]) === 0);

Questions # 14:

Refer to the following object:

const dog = {

firstName: ' Beau ' ,

lastName: ' Boo ' ,

get fullName() {

return this.firstName + ' ' + this.lastName;

}

};

How can a developer access the fullName property for dog?

Options:

A.

dog.fullName

B.

dog.fullName()

C.

dog.get.fullName

D.

dog.function.fullName()

Questions # 15:

Given the code:

const copy = JSON.stringify([new String( ' false ' ), new Boolean(false), undefined]);

What is the value of copy?

Options:

A.

' [ " false " , false, null] '

B.

' [false, {}] '

C.

' [ " false " , false, undefined] '

D.

' [ " false " , {}] '

Questions # 16:

A developer has two ways to write a function:

Option A:

01 function Monster() {

02 this.growl = () = > {

03 console.log( " Grr! " );

04 }

05 }

Option B:

01 function Monster() {};

02 Monster.prototype.growl = () = > {

03 console.log( " Grr! " );

04 }

After deciding on an option, the developer creates 1000 monster objects. How many growl methods are created with Option A and Option B?

Options:

A.

1000 growl methods are created regardless of which option is used.

B.

1 growl method is created regardless of which option is used.

C.

1000 growl methods are created for Option A. 1 growl method is created for Option B.

D.

1 growl method is created for Option A. 1000 growl methods are created for Option B.

Questions # 17:

Refer to the code:

const pi = 3.1415926;

What is the data type of pi?

Options:

A.

Float

B.

Double

C.

Decimal

D.

Number

Questions # 18:

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.

Questions # 19:

Given the following code:

let x = ( ' 15 ' + 10) * 2;

What is the value of x?

Options:

A.

1520

B.

3020

C.

50

D.

35

Questions # 20:

Refer to the code below:

const searchText = ' Yay! Salesforce is amazing! ' ;

let result1 = searchText.search(/sales/i);

let result2 = searchText.search(/sales/);

console.log(result1);

console.log(result2);

After running this code, which result is displayed on the console?

Options:

A.

5

undefined

B.

5

0

C.

true

false

D.

5

-1

Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions