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

JavaScript-Developer-I Exam Dumps - Salesforce Developer Questions and Answers

Question # 4

Given two expressions var1 and var2, what are two valid ways to return the concatenation of the two expressions and ensure it is data type string?

Options:

A.

String(var1).concat(var2)

B.

String.concat(var1 + var2)

C.

var1 + var2

D.

var1.toString() + var2.toString()

Buy Now
Question # 5

A developer publishes a new version of a package with bug fixes but no breaking changes. The old version number was 2.1.1.

What should the new package version number be based on semantic versioning?

Options:

A.

2.1.2

B.

2.2.0

C.

2.2.1

D.

3.1.1

Buy Now
Question # 6

A developer wants to use a module called DatePrettyPrint.

This module exports one default function called printDate().

How can the developer import and use printDate()?

Options:

A.

import DatePrettyPrint() from ' /path/DatePrettyPrint.js ' ;

printDate();

B.

import DatePrettyPrint from ' /path/DatePrettyPrint.js ' ;

DatePrettyPrint.printDate();

C.

import printDate from ' /path/DatePrettyPrint.js ' ;

DatePrettyPrint.printDate();

D.

import printDate from ' /path/DatePrettyPrint.js ' ;

printDate();

Buy Now
Question # 7

Given the code below:

01 const delay = async delay = > {

02 return new Promise((resolve, reject) = > {

03 console.log(1);

04 setTimeout(resolve, delay);

05 });

06 };

07

08 const callDelay = async () = > {

09 console.log(2);

10 const yup = await delay(1000);

11 console.log(3);

12 };

13

14 console.log(4);

15 callDelay();

16 console.log(5);

What is logged to the console?

Options:

A.

4 2 1 5 3

B.

4 2 1 5 3

C.

1 4 2 3 5

D.

4 5 1 2 3

Buy Now
Question # 8

Refer to the HTML below:

< div id= " main " >

< ul >

< li > Leo < /li >

< li > Tony < /li >

< li > Tiger < /li >

< /ul >

< /div >

Which JavaScript statement results in changing " Leo " to " The Lion " ?

Options:

A.

document.querySelectorAll( ' #main #Leo ' ).innerHTML = ' The Lion ' ;

B.

document.querySelector( ' #main li:second-child ' ).innerHTML = ' The Lion ' ;

C.

document.querySelectorAll( ' #main li,Leo ' ).innerHTML = ' The Lion ' ;

D.

document.querySelector( ' #main li:nth-child(1) ' ).innerHTML = ' The Lion ' ;

Buy Now
Question # 9

Given the code below:

let numValue = 1982;

Which three code segments result in a correct conversion from number to string?

Options:

A.

let strValue = numValue.toText();

B.

let strValue = String(numValue);

C.

let strValue = ' ' + numValue;

D.

let strValue = numValue.toString();

E.

let strValue = (String)numValue;

Buy Now
Question # 10

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()

Buy Now
Question # 11

A class was written to represent regular items and sale items. Code:

01 let regItem = new Item( ' Scarf ' , 55);

02 let saleItem = new SaleItem( ' Shirt ' , 80, .1);

03 Item.prototype.description = function() { return ' This is a ' + this.name; }

04 console.log(regItem.description());

05 console.log(saleItem.description());

06

07 SaleItem.prototype.description = function() { return ' This is a discounted ' + this.name; }

08 console.log(regItem.description());

09 console.log(saleItem.description());

What is the output?

Options:

A.

This is a Scarf

Uncaught TypeError: saleItem.description is not a function

This is a Shirt

This is a discounted Shirt

B.

This is a Scarf

This is a Shirt

This is a Scarf

This is a discounted Shirt

C.

This is a Scarf

Uncaught TypeError: saleItem.description is not a function

This is a Scarf

This is a discounted Shirt

D.

This is a Scarf

This is a Shirt

This is a discounted Scarf

This is a discounted Shirt

Buy Now
Question # 12

Given the following code:

01 counter = 0;

02 const logCounter = () = > {

03 console.log(counter);

04 };

05 logCounter();

06 setTimeout(logCounter, 2100);

07 setInterval(() = > {

08 counter++;

09 logCounter();

10 }, 1000);

What will be the first four numbers logged?

Options:

A.

0122

B.

0123

C.

0112

D.

0012

Buy Now
Question # 13

Given the code:

01 function GameConsole(name) {

02 this.name = name;

03 }

04

05 GameConsole.prototype.load = function(gamename) {

06 console.log( ' ${this.name} is loading a game: ${gamename}.... ' );

07 }

08

09 function Console16bit(name) {

10 GameConsole.call(this, name);

11 }

12

13 Console16bit.prototype = Object.create(GameConsole.prototype);

14

15 // insert code here

16 console.log( ' ${this.name} is loading a cartridge game: ${gamename}.... ' );

17 }

18

19 const console16bit = new Console16bit( ' SNEGeneziz ' );

20 console16bit.load( ' Super Monic 3x Force ' );

What should a developer insert at line 15?

Options:

A.

Console16bit = Object.create(GameConsole.prototype).load = function(gamename) {

B.

Console16bit.prototype.load(gamename) = function() {

C.

Console16bit.prototype.load(gamename) {

D.

Console16bit.prototype.load = function(gamename) {

Buy Now
Exam Name: Salesforce Certified JavaScript Developer (JS-Dev-101)
Last Update: Jun 19, 2026
Questions: 147
JavaScript-Developer-I pdf

JavaScript-Developer-I PDF

$25.5  $84.99
JavaScript-Developer-I Engine

JavaScript-Developer-I Testing Engine

$28.5  $94.99
JavaScript-Developer-I PDF + Engine

JavaScript-Developer-I PDF + Testing Engine

$40.5  $134.99