Which value can a developer expect when referencing country,capital,city String?
Refer to the code below: Which value can a developer expect when referencing country,capital,city String?A . 'London'B . undefinedC . An errorD . 'NaN'View AnswerAnswer: D
Which code executes sayHello once, two minutes from now?
Refer to the code below: let sayHello = () => { console.log (‘Hello, world!’); }; Which code executes sayHello once, two minutes from now?A . setTimeout(sayHello, 12000);B . setInterval(sayHello, 12000);C . setTimeout(sayHello(), 12000);D . delay(sayHello, 12000);View AnswerAnswer: A
Which three benefits of Node.js can the developer use to persuade their manager?
developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript. Which...
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?
Given the following code: document.body.addEventListener(‘ click ’, (event) => { if (/* CODE REPLACEMENT HERE */) { console.log(‘button clicked!’); ) }); Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?A . Event.clickedB . e.nodeTarget ==thisC . event.target.nodeName...
What is the value of result when Promise.race executes?
Refer to the code below: Let car1 = new Promise((_ , reject) => setTimeout(reject, 2000, “car 1 crashed in” => Let car2 =new Promise(resolve => setTimeout(resolve, 1500, “car 2 completed”) Let car3 =new Promise(resolve => setTimeout(resolve, 3000, “car 3 completed”) Promise.race(( car1, car2, car3)) .then (value => ( Let result...
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?
Given the following code: document.body.addEventListener(‘ click ’, (event) => { if (/* CODE REPLACEMENT HERE */) { console.log(‘button clicked!’); ) }); Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?A . Event.clickedB . e.nodeTarget ==thisC . event.target.nodeName...
Consider type coercion, what does the following expression evaluate to?
Consider type coercion, what does the following expression evaluate to? True + 3 + ‘100’ + nullA . 104B . 4100C . ‘3100null’D . ‘4100null’View AnswerAnswer: D
Which statement assigns the values sku 0000000008675309?
Refer to code below: Let productSKU = ‘8675309’ ; A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with ‘sku’, and padded with zeros. Which statement assigns the values sku 0000000008675309?A . productSKU = productSKB . padStart (19. ‘0’).padstart(‘sku’);C . productSKU = productSKD...
Which assertion accuretely tests the above code?
Refer to the code below: Async funct on functionUnderTest(isOK) { If (isOK) return ‘OK’ ; Throw new Error(‘not OK’); ) Which assertion accuretely tests the above code?A . Console.assert (await functionUnderTest(true), ‘ OK ’)B . Console.assert (await functionUnderTest(true), ‘ not OK ’)C . Console.assert (await functionUnderTest(true), ‘ not OK ’)D...
Which statement flattens myArray when it can be arbitrarily nested?
myArraym can have one level, two levels, or more levels. Which statement flattens myArray when it can be arbitrarily nested?A . myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);B . myArray. join (","). split (",");C . [ ] .concat {. . .myArray) ;D . myArray.flat(Infinity);View AnswerAnswer: A