Free Salesforce Javascript-Developer-I Exam Actual Questions

The questions for Javascript-Developer-I were last updated On Nov 18, 2024

Question No. 1

A developer is asked to fix some bugs reported by users. To do that, the developer adds

abreakpoint for debugging.

Function Car (maxSpeed, color){

This.maxspeed =masSpeed;

This.color = color;

Let carSpeed = document.getElementById(' CarSpeed');

Debugger;

Let fourWheels =new Car (carSpeed.value, 'red');

When the code execution stops at the breakpoint on line 06, which two types of information are

available in the browser console ?

Choose 2 answers:

Show Answer Hide Answer
Correct Answer: C, D

Question No. 2

developer uses the code below to format a date.

After executing, what is the value offormattedDate?

Show Answer Hide Answer
Correct Answer: B

Question No. 3

A developer is creating a simple webpage with a button. When a userclicks this button

for the first time, a message is displayed.

The developer wrote the JavaScript code below, but something is missing. The

message gets displayed every time a user clicks the button, instead of just the first time.

01 functionlisten(event) {

02 alert ( 'Hey! I am John Doe') ;

03 button.addEventListener ('click', listen);

Which two code lines make this code work as required?

Choose 2 answers

Show Answer Hide Answer
Correct Answer: C, D

Question No. 4

Refer to the code below:

let o = {

get js() {

let city1 = String("st. Louis");

let city2 = String(" New York");

return {

firstCity: city1.toLowerCase(),

secondCity: city2.toLowerCase(),

}

}

}

What value can a developer expect when referencing o.js.secondCity?

Show Answer Hide Answer
Correct Answer: B

Question No. 5

Refer to the following array:

Let arr = [ 1,2, 3, 4, 5];

Which three options result in x evaluating as [3, 4, 5] ?

Choose 3 answers.

Show Answer Hide Answer
Correct Answer: B, C, D