Which type of test category describes this test?

developer removes the HTML class attribute from the checkout button, so now it is simply: <button>Checkout</button>. There is a test to verify the existence of the checkout button, however it looks for a button with class= “blue”. The test fails because no such button is found. Which type of test...

January 11, 2021 1 Comment READ MORE +

Which option is a core Node,js module?

Which option is a core Node,js module?A . PathB . IosC . MemoryD . locateView AnswerAnswer: A

January 11, 2021 No Comments READ MORE +

What is the value of result after the code executes?

Refer to the code below: Function changeValue(obj) { Obj.value = obj.value/2; } Const objA = (value: 10); Const objB = objA; changeValue(objB); Const result = objA.value; What is the value of result after the code executes? A. 10 B. Nan C. 5 D. UndefinedView AnswerAnswer: C

January 11, 2021 No Comments READ MORE +

Which three options can the developer invoke for this function to get a return value of 10?

A developer implements a function that adds a few values. Function sum(num) { If (num == undefined) { Num =0; } Return function( num2, num3){ If (num3 === undefined) { Num3 =0 ; } Return num + num2 + num3; } } Which three options can the developer invoke for...

January 11, 2021 No Comments READ MORE +

Which two assert statements are valid tests for the function?

A developer needs to test this function: 01 const sum3 = (arr) => ( 02 if (!arr.length) return 0, 03 if (arr.length === 1) return arr[0], 04 if (arr.length === 2) return arr[0] + arr[1], 05 return arr[0] + arr[1] + arr[2], 06 ); Which two assert statements are valid...

January 10, 2021 1 Comment READ MORE +

In lines 04 and 08, which code allows the user to select an image from their local computer, and to display the image in the browser?

is below: <input type=”file” onchange=”previewFile()”> <img src=”” height=”200” alt=”Image Preview…”/> The JavaScript portion is: 01 function previewFile(){ 02 const preview = document.querySelector(‘img’); 03 const file = document.querySelector(‘input[type=file]’).files[0]; 04 //line 4 code 05 reader.addEventListener(“load”, () => { 06 preview.src = reader.result; 07 },false); 08 //line 8 code 09 } In lines...

January 10, 2021 1 Comment READ MORE +

Which method should be used to execute this business requirement?

A developer creates an object where its properties should be immutable and prevent properties from being added or modified. Which method should be used to execute this business requirement?A . Object.const()B . Object.eval()C . Object.lock()D . Object.freeze()View AnswerAnswer: D

January 10, 2021 No Comments READ MORE +

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...

January 10, 2021 No Comments READ MORE +

What is the value of output after the code executes?

Refer to following code block: Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,]; Let output =0; For (let num of array){ if (output >0){ Break; } if(num % 2 == 0){ Continue; } Output +=num; What is the value of output after the code...

January 10, 2021 No Comments READ MORE +

What are the values of objBook and newObjBook respectively?

Refer to code below: Const objBook = { Title: ‘Javascript’, }; Object.preventExtensions(objBook); Const newObjBook = objBook; newObjectBook.author = ‘Robert’; What are the values of objBook and newObjBook respectively?A . [title: “javaScript”] [title: “javaScript”]B . {author: “Robert”, title: “javaScript} UndefinedC . {author: “Robert”, title: “javaScript} {author: “Robert”, title: “javaScript}D . {author:...

January 10, 2021 No Comments READ MORE +