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

Refer to the code below

let inArray = [[1,2],[3,4,5]];

which two statements results in the array [1,2,3,4,5]?

choose 2 answer

A.

[ ].concat(...inArray);

B.

[ ].concat.apply(inArray,[ ]);

C.

[ ].concat([...inArray])

D.

[ ].concat.apply([ ],inArray);

Given the code below:

Setcurrent URL ();

console.log(‘The current URL is: ‘ +url );

functionsetCurrentUrl() {

Url = window.location.href:

What happens when the code executes?

A.

The url variable has local scope and line 02 throws an error.

B.

The url variable has global scope and line 02 executes correctly.

C.

The url variable has global scope and line 02 throws an error.

D.

The url variable has local scope and line 02 executes correctly.

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

A.

The line 05 assertion passes.

B.

The line 02 assertion passes.

C.

The line 02 assertion fails.

D.

The line 05 assertion fails.

Refer to thefollowing code that imports a module named utils:

import (foo, bar) from ‘/path/Utils.js’;

foo() ;

bar() ;

Which two implementations of Utils.js export foo and bar such that the code above runs without

error?

Choose 2 answers

A.

// FooUtils.js and BarUtils.js existImport (foo) from ‘/path/FooUtils.js’;Import (boo) from ‘ /path/NarUtils.js’;

B.

const foo = () => { return ‘foo’ ; }const bar = () => { return ‘bar’ ; }export { bar, foo }

C.

Export default class {foo() { return ‘foo’ ; }bar() { return ‘bar’ ; }}

D.

const foo = () => { return ‘foo’;}const bar = () => {return ‘bar’; }Export default foo, bar;

Given the code below:

FunctionmyFunction(){

A =5;

Var b =1;

}

myFunction();

console.log(a);

console.log(b);

What is the expected output?

A.

Both lines 08 and 09 are executed, and the variables are outputted.

B.

Line 08 outputs the variable, but line 09 throws an error.

C.

Line 08thrones an error, therefore line 09 is never executed.

D.

Both lines 08 and 09 are executed, but values outputted are undefined.

Refer to the code declarations below:

Which three expressions return the string JavaScript?

Choose 3 answers

A.

Str1.join (str2);

B.

Str1.concat (str2);

C.

Concat (str1, str2);

D.

$(str1) $ (str2} ‘;

E.

Str1 + str2;

developer creates a new web server that uses Node.js. It imports a server library that

uses events and callbacks for handling server functionality.

The server library is imported with require and is made available to the code by a

variable named server. The developer wants to log any issues that the server has while booting

up.

Given the code and the information thedeveloper has, which code logs an error at boost

with an event?

A.

Server.catch ((server) => {console.log(‘ERROR’, error);});

B.

Server.error ((server) => {console.log(‘ERROR’, error);});

C.

Server.on (‘error’, (error) => {console.log(‘ERROR’, error);});

D.

Try{server.start();} catch(error) {console.log(‘ERROR’, error);}

A developer has a web server running with Node.js. The command to start the web server is node server.js. The web server started having

latency issues. Instead of a one second turnaround for web requests, the developer now sees a five second turnaround.

Which command can the web developer run to see what the module is doing during the latency period?

A.

NODE_DEBUG=true node server.js

B.

DEBUG=http, https node server.js

C.

NODE_DEBUG=http,https node server.js

D.

DEBUG=true node server.js

Which three browser specific APIs are available for developers to persist data between page loads ?

Choose 3 answers

A.

IIFEs

B.

indexedDB

C.

Global variables

D.

Cookies

E.

localStorage.

A developer wrote a fizzbuzz function thatwhen passed in a number, returns the

following:

● ‘Fizz’ if the number is divisible by 3.

● ‘Buzz’ if the number is divisible by 5.

● ‘Fizzbuzz’ if the number is divisible by both 3 and 5.

● Empty string if the number is divisible by neither 3 or 5.

Whichtwo test cases will properly test scenarios for the fizzbuzz function?

Choose 2 answers

A.

let res = fizzbuzz(5);console.assert ( res === ‘ ’ );

B.

let res = fizzbuzz(15);console.assert ( res === ‘ fizzbuzz ’ )

C.

let res = fizzbuzz(Infinity);console.assert ( res === ‘ ’ )

D.

let res = fizzbuzz(3);console.assert ( res === ‘ buzz ’ )