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

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.

Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))

B.

Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;

C.

Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);

D.

Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

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?

A.

On the browser JavaScriptconsole

B.

On the terminal console running the web server

C.

In the browser performance tools log

D.

On the webpage console log

What is the result of the code block?

A.

The console logs only ‘flag’.

B.

The console logs ‘flag’ and another flag.

C.

An error is thrown.

D.

The console logs ‘flag’ and then an error is thrown.

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.

Error: myFather.job is not a function

B.

Undefined Developer

C.

John undefined

D.

John Developer

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

A.

Integration

B.

Black box

C.

White box

D.

Mocking

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.

console.assert(sum3(1, ‘2’)) == 12);

B.

console.assert(sum3(0)) == 0);

C.

console.assert(sum3(-3, 2 )) == -1);

D.

console.assert(sum3(‘hello’, 2, 3, 4)) === NaN);

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?

A.

Terminal running the web server.

B.

Browser performance toots

C.

Browser javaScript console

D.

On the webpage.

Which option is a core Node,js module?

A.

Path

B.

Ios

C.

Memory

D.

locate

Which code change should be done for the console to log the following when 'Click me!' is clicked'

> Row log

> Table log

A.

Remove lines 13 and14

B.

Change line 10 to event.stopPropagation (false) ;

C.

Change line 14 to elem.addEventListener ('click', printMessage, true);

D.

Remove line 10