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