Given the HTML below:
Which statement adds the priority-account css class to the Applied Shipping row?
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?
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers
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 developer creates a generic function to log custom messages in the console. To do this,
the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{‘Item status is: %s’, status};
03 }
Which three console logging methods allow the use of string substitution in line 02?
What are two unique features of functions defined with a fat arrow as compared to normal function definition?
Choose 2 answers
A developer implements a function that adds a few values.
Function sum(num) {
If (num == undefined) {
Num =0;
}
Return function( num2, num3){
If (num3 === undefined) {
Num3 =0 ;
}
Return num + num2 + num3;
}
}
Which three options can the developer invoke for this function to get a return value of 10 ?
Choose 3 answers
A developer has an ErrorHandler module that contains multiple functions.
What kind of export be leverages so that multiple functions can be used?
Which three actions can be using the JavaScript browser console?
Choose 3 answers:
Refer to the code below:
Which replacement for the conditional statement on line 02 allows a developer to correctly determine
that a specific element, myElement on the page had been clicked?
Refer to the code below:
What is the value of result after line 10 executes?
Universal Containers (UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions any that might cause this problem. To verify this, the developer decides to execute everything and log the time each of these three suspicious functions consumes.
Which function can the developer use to obtain the time spent by every one of the three functions?
Consider type coercion, what does the following expression evaluate to?
True + 3 + ‘100’ + null
Refer to the code below:
let sayHello = () => {
console.log (‘Hello, world!’);
};
Which code executes sayHello once, two minutes from now?
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers
Refer to the code below:
Function changeValue(obj) {
Obj.value = obj.value/2;
}
Const objA = (value: 10);
Const objB = objA;
changeValue(objB);
Const result = objA.value;
What is the value of result after the code executes?
Refer to following code block:
Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];
Let output =0;
For (let num of array){
if (output >0){
Break;
}
if(num % 2 == 0){
Continue;
}
Output +=num;
What is the value of output after the code executes?
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
The developer wrote the javascript code below:
Const button = document.querySelector(‘button’);
button.addEvenListener(‘click’, () => (
Const input = document.querySelector(‘input’);
console.log(input.getAttribute(‘value’));
When the user clicks the button, the output is always “Helloâ€.
What needs to be done to make this code work as expected?
A developer has the function, shown below, that is called when a page loads.
Where can the developer see the log statement after loading the page in the browser?
Which code statement correctly retrieves and returns an object from localStorage?
A developer creates an object where its properties should be immutable and prevent
properties from being added or modified.
Which method should be used to execute this business requirement ?
Refer to the code below?
Let searchString = ‘ look for this ’;
Which two options remove the whitespace from the beginning of searchString?
Choose 2 answers
Refer to the code below:
Let textValue = ’1984’;
Which code assignment shows a correct way to convert this string to an integer?