Weekend Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple70

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

Practice at least 50% of the questions to maximize your chances of passing.
Exam JavaScript-Developer-I Premium Access

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


400 Students Passed

92% Average Score

94% Same Questions
Viewing page 1 out of 7 pages
Viewing questions 1-10 out of questions
Questions # 1:

myArraym can have one level, two levels, or more levels.

Which statement flattens myArray when it can be arbitrarily nested?

Options:

A.

myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);

B.

myArray. join (",").split (",");

C.

[ ] .concat {. . .myArray) ;

D.

myArray.flat(Infinity);

Questions # 2:

Given the requirement to refactor the code above to JavaScript class format, which class

definition is correct?

Question # 2

A)

Question # 2

B)

Question # 2

C)

Question # 2

D)

Question # 2

Options:

Questions # 3:

Given the following code:

Question # 3

is the output of line 02?

Options:

A.

''x''

B.

''null'''

C.

''object''

D.

''undefined''

Questions # 4:

Refer to the following object:

const cat ={

firstName: ‘Fancy’,

lastName: ‘ Whiskers’,

Get fullName() {

return this.firstName + ‘ ‘ + this.lastName;

}

};

How can a developer access the fullName property for cat?

Options:

A.

cat.fullName

B.

cat.fullName()

C.

cat.get.fullName

D.

cat.function.fullName()

Questions # 5:

A developer has the following array of hourly wages:

Let arr = (8, 5, 9, 75, 11, 25, 7, 75, , 13, 25);

For workers making less than $10 an hour rate should be multiple by 1.25 and returned in a new array.

How should the developer implement the request?

Options:

A.

let arrl = arr.filter((val) => val < 10).map((num) -> num = 1.25);

B.

let arrl = arr .rr.acArray ((val) => ( val < 10 )) ,map((num) => { num * 1.25 ));

C.

let arrl = arr-map((num) => { return ran * 1.25 }).filter((val) -> { return val < 10));

D.

let arrl = arr.filterBy((val) => val < 10 ).aapBy<(num) -> num = ..25 );

Questions # 6:

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

Options:

A.

On line 02, use event.first to test if it is the first execution.

B.

On line 04, useevent.stopPropagation ( ),

C.

On line 04, use button.removeEventListener(‘ click” , listen);

D.

On line 06, add an option called once to button.addEventListener().

Questions # 7:

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

Whatis the value of result after the code executes?

Options:

A.

100

B.

undefined

C.

null

D.

70

Questions # 8:

A developer receives a comment from the Tech Lead that the code given below has

error:

const monthName = ‘July’;

const year = 2019;

if(year === 2019) {

monthName =‘June’;

}

Which line edit should be made to make this code run?

Options:

A.

01 let monthName =’July’;

B.

02 let year =2019;

C.

02 const year = 2020;

D.

03 if (year == 2019) {

Questions # 9:

Refer to the code below:

Function Person(firstName, lastName, eyecolor) {

this.firstName =firstName;

this.lastName = lastName;

this.eyeColor = eyeColor;

}

Person.job = ‘Developer’;

const myFather = new Person(‘John’, ‘Doe’);

console.log(myFather.job);

What is the output after the code executes?

Options:

A.

ReferenceError: eyeColor is not defined

B.

ReferenceError: assignment to undeclared variable “Person”

C.

Developer

D.

Undefined

Questions # 10:

Which statement can a developer apply to increment the browser's navigation history without a page refresh?

Which statement can a developer apply to increment the browser's navigation history without a page refresh?

Options:

A.

window.history.pushState(newStateObject);

B.

window.history.pushStare(newStateObject, ' ', null);

C.

window.history.replaceState(newStateObject,'', null);

D.

window.history.state.push(newStateObject);

Viewing page 1 out of 7 pages
Viewing questions 1-10 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.