Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

Pearson JavaScript-Developer-I New Attempt

Page: 2 / 8
Question 8

A developer wants to create an object from a function in the browser using the code below.

What happens due to the lack of the mm keyword on line 02?

Options:

A.

window.name is assigned to 'hello' and the variable = remains undefined.

B.

window.m Is assigned the correct object.

C.

The m variable is assigned the correct object but this.name remains undefined.

D.

The m variable is assigned the correct object.

Question 9

Given the following code:

document.body.addEventListener(‘ click ’, (event) => {

if (/* CODE REPLACEMENT HERE */) {

console.log(‘button clicked!’);

)

});

Which replacement for the conditional statement on line 02 allows a developer to

correctly determine that a button on page is clicked?

Options:

A.

Event.clicked

B.

e.nodeTarget ==this

C.

event.target.nodeName == ‘BUTTON’

D.

button.addEventListener(‘click’)

Question 10

Refer to the code snippet below:

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

For (let i =0; i < array.length; i++)

if (array[i] === 4) {

array.splice(i, 1);

}

}

What is the value of array after the code executes?

Options:

A.

[1, 2, 3, 4, 5, 4, 4]

B.

[1, 2, 3, 4, 4, 5, 4]

C.

[1, 2, 3, 5]

D.

[1, 2, 3, 4, 5, 4]

Option D

Question 11

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

Page: 2 / 8
Exam Name: Salesforce Certified JavaScript Developer I (SU24)
Last Update: Nov 24, 2024
Questions: 215
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