Summer Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dealsixty

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

Question # 14

Refer to the code below:

Function changeValue(obj) {

Obj.value = obj.value/2;

}

Const objA = (value: 10);

Const objB = objA;

changeValue(objB);

Const result = objA.value;

What is the value of result after the code executes?

Options:

A.

10

B.

Nan

C.

5

D.

Undefined

Buy Now
Question # 15

The developer has a function that prints “Hello” to an input name. To test this, thedeveloper created a function that returns “World”. However the following snippet does not print “ Hello World”.

What can the developer do to change the code to print “Hello World” ?

Options:

A.

Change line 7 to ) () ;

B.

Change line 2 to console.log(‘Hello’ , name() );

C.

Change line 9 to sayHello(world) ();

D.

Change line 5 to function world ( ) {

Buy Now
Question # 16

Refer to the following code:

What is the value of output on line 11?

Options:

A.

[1, 2]

B.

[‘’foo’’, ‘’bar’’]

C.

[‘’foo’’:1, ‘’bar’’:2’’]

D.

An error will occur due to the incorrect usage of the for…of statement on line 07.

Buy Now
Question # 17

A developer has the function, shown below, that is called when a page loads.

Where can the developer see the log statement after loading the page in the browser?

Options:

A.

On the browser JavaScript console

B.

On the terminal console running the web server

C.

In the browser performance tools log

D.

On the webpage console log

Buy Now
Question # 18

Given the code below:

What is logged to the console'

Options:

A.

1 2 3 4 5

B.

1 2 5 3 4

C.

2 5 1 3 4

D.

2 5 3 4 1

Buy Now
Question # 19

Refer to code below:

function Person() {

this.firstName = ’John’;

}

Person.prototype ={

Job: x => ‘Developer’

};

const myFather = new Person();

const result =myFather.firstName + ‘ ‘ + myFather.job();

What is the value of the result after line 10 executes?

Options:

A.

Error: myFather.job is not a function

B.

Undefined Developer

C.

John undefined

D.

John Developer

Buy Now
Question # 20

A class was written to represent items for purchase in an online store, and a second class

Representing items that are on sale at a discounted price. THe constructor sets the name to the

first value passed in. The pseudocode is below:

Class Item {

constructor(name, price) {

… // Constructor Implementation

}

}

Class SaleItem extends Item {

constructor (name, price, discount) {

...//Constructor Implementation

}

}

There is a new requirement for a developer to implement a description method that will return a

brief description for Item and SaleItem.

Let regItem =new Item(‘Scarf’, 55);

Let saleItem = new SaleItem(‘Shirt’ 80, -1);

Item.prototype.description = function () { return ‘This is a ’ + this.name;

console.log(regItem.description());

console.log(saleItem.description());

SaleItem.prototype.description = function () { return ‘This is a discounted ’ +

this.name; }

console.log(regItem.description());

console.log(saleItem.description());

What is the output when executing the code above ?

Options:

A.

This is a Scarf

Uncaught TypeError: saleItem.description is not a function

This is aScarf

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

This is a Shirt

This is a discounted Scarf

This is a discounted Shirt

D.

This is aScarf

Uncaught TypeError: saleItem.description is not a function

This is a Shirt

This is a did counted Shirt

Buy Now
Question # 21

Refer to following code:

class Vehicle {

constructor(plate) {

This.plate =plate;

}

}

Class Truck extends Vehicle {

constructor(plate, weight) {

//Missing code

This.weight = weight;

}

displayWeight() {

console.log(‘The truck ${this.plate} has a weight of ${this.weight} lb.’);}}

Let myTruck = new Truck(‘123AB’, 5000);

myTruck.displayWeight();

Which statement should be added to line 09 for the code to display ‘The truck 123AB has a

weight of 5000lb.’?

Options:

A.

Super.plate =plate;

B.

super(plate);

C.

This.plate =plate;

D.

Vehicle.plate = plate;

Buy Now
Question # 22

A developer wants to define a function log to be used a few times on a single-file JavaScript script.

01 // Line 1 replacement

02 console.log('"LOG:', logInput);

03 }

Which two options can correctly replace line 01 and declare the function for use?

Choose 2 answers

Options:

A.

function leg(logInput) {

B.

const log(loginInput) {

C.

const log = (logInput) => {

D.

function log = (logInput) {

Buy Now
Question # 23

Refer to the code below:

Const pi = 3.1415326,

What is the data type of pi?

Options:

A.

Double

B.

Number

C.

Decimal

D.

Float

Buy Now
Exam Name: Salesforce Certified JavaScript Developer I (WI25)
Last Update: Apr 29, 2025
Questions: 215
JavaScript-Developer-I pdf

JavaScript-Developer-I PDF

$34  $84.99
JavaScript-Developer-I Engine

JavaScript-Developer-I Testing Engine

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

JavaScript-Developer-I PDF + Testing Engine

$54  $134.99