A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students
who scored more than 15 points.
How should thedeveloper implement the request?
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?
What is the result of the code block?
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?
A test has a dependency on database.query. During the test the dependency is replaced
with an object called database with the method, query, that returns an array. The
developer needs to verify how many times the method was called and the arguments
used each time.
Which two test approaches describe the requirement?
Choose 2 answers
Refer the following code
what is the value of array after code executes?
A developer needs to test this function:
01const sum3 = (arr) => (
02if (!arr.length) return 0,
03if (arr.length === 1) return arr[0],
04if (arr.length === 2) return arr[0]+ arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function?
Choose 2 answers
A developer has the function, shown below, that is called when a page loads.
function onload() {
console.log(“Page has loaded!”);
}
Where can the developer see the log statement after loading the page in the browser?
Which option is a core Node,js module?
Which code change should be done for the console to log the following when 'Click me!' is clicked'
> Row log
> Table log