Refer the code below.
x=3.14;
function myfunction() {
"use strict";
y=x;
}
z=x;
myFunction();
Answer is in the explanation below.
Loading demo links...
Showing 1–3 of 15 questions
Refer the code below.
x=3.14;
function myfunction() {
"use strict";
y=x;
}
z=x;
myFunction();
Answer is in the explanation below.
A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.
A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.

Which two results occur when running this test on the updated sum3 function?
Choose 2 answers
Select all that apply, then click Submit answer.
The line 05 assertion passes.
The line 02 assertion passes.
The line 02 assertion fails.
The line 05 assertion fails.
Refer to the string below:
const str = 'Salesforce';
Which two statements result in the word 'Sales'?
Choose 2 answers
Select all that apply, then click Submit answer.
str.substr(1, 5);
str.substr (0, 5);
str.substring (1, 5);
str.substring (0, 5);