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

JavaScript-Developer-I Exam Questions Tutorials

Salesforce Certified JavaScript Developer I (SP23) Questions and Answers

Question 13

developer publishes a new version of a package with new features that do not break

backward compatibility. The previous version number was 1.1.3.

Following semantic versioning format, what should the new package version number

be?

Options:

A.

2.0.0

B.

1.2.3

C.

1.1.4

D.

1.2.0

Question 14

Refer to the code below:

const car = {

price:100,

getPrice:function(){

return this.price;

}

};

const customCar = Object.create(car);

customCar.price = 70;

delete customCar.price;const result = customCar.getPrice();

What is the value of result after the code executes?

Options:

A.

100

B.

undefined

C.

null

D.

70

Question 15

A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.

A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.

Which two results occur when running this test on the updated sum3 function?

Choose 2 answers

Options:

A.

The line 05 assertion passes.

B.

The line 02 assertion passes.

C.

The line 02 assertion fails.

D.

The line 05 assertion fails.

Question 16

In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.

Which two methods are used to address this ?

Choose 2 answers

Options:

A.

Use the document object instead of the window object.

B.

Assign variables to the global object.

C.

Create a new window object in the root file.

D.

Assign variables to module.exports and require them as needed.