Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exc65

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 replaceline 01 and declare the function for use?

Choose 2 answers

A.

function leg(logInput) {

B.

const log(loginInput) {

C.

const log = (logInput) => {

D.

function log = (logInput) {

Given the HTML below:

Which statement adds the priority-account CSS class to the Universal Containers row?

A.

document. querySelector (#row-uc').classes-push('priority-account');

B.

document. getElementByid('row-uc').addClass('priority-account*);

C.

document. querySelectorAll('#row-uc') -classList.add("priority-accour');

D.

document. queryselector('#row-uc').ClassList.add('priority-account');

A developer at Universal Containers creates a new landing page based on HTML, CSS, and

JavaScript TO ensure that visitors have a goodexperience, a script named personaliseContext

needs to be executed when the webpage is fully loaded (HTML content and all related files ), in

order to do some custom initialization.

Which statement should be used to call personalizeWebsiteContent based onthe above

business requirement?

A.

document.addEventListener(‘’onDOMContextLoaded’, personalizeWebsiteContext);

B.

window.addEventListener(‘load’,personalizeWebsiteContext);

C.

window.addEventListener(‘onload’, personalizeWebsiteContext);

D.

Document.addEventListener(‘‘’DOMContextLoaded’ , personalizeWebsiteContext);

After user acceptance testing, the developer is asked to change the webpage background based on user's location. This change was implemented and deployed for testing.

The tester reports that the background is not changing, however it works as required when viewing on the developer's computer.

Which two actions will help determine accurate results?

Choose 2 answers

A.

The developer should inspect their browser refresh settings.

B.

The tester should disable their browser cache.

C.

The developer should rework the code.

D.

The tester should dear their browser cache.

Which statement accurately describes an aspect of promises?

A.

Arguments for the callback function passed to .then() are optional.

B.

In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.

C.

.then() cannot be added after a catch.

D.

.then() manipulates and returns the original promise.

Given the code below:

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?

A.

console.group(usersList) ;

B.

console.table(usersList) ;

C.

console.info(usersList) ;

D.

console.groupCol lapsed (usersList) ;

Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?

Choose 3 answers

A.

z is equal to 3.14.

B.

'use strict' is hoisted, so it has an effect on all lines.

C.

'use strict' has an effect only on line 05.

D.

'use strict' has an effect between line 04 and the end of the file.

E.

Line 05 throws an error.

Given the code below:

What is logged to the console'

A.

1 2 3 4 5

B.

1 2 5 3 4

C.

2 5 1 3 4

D.

2 5 3 4 1

Refer to the following code:

What is the output of line 11?

A.

[1,2]

B.

["bar", "foo"]

C.

["foo:1", "bar:2"]

D.

["foo", "bar"]

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?

A.

Event.clicked

B.

e.nodeTarget ==this

C.

event.target.nodeName == ‘BUTTON’

D.

button.addEventListener(‘click’)