Which three statements are true about promises? Choose 3 answers

Which three statements are true about promises? Choose 3 answersA . The executor of a new Promise runs automatically.B . A Promise has a .then() method.C . A fulfilled or rejected promise will not change states .D . A settled promise can become resolved.E . A pending promise canbecome fulfilled,...

September 18, 2024No CommentsREAD MORE +

Which statement phrases successfully?

Which statement phrases successfully?A . JSON.parse (‘ foo ’ );B . JSON.parse (“ foo ” );C . JSON.parse( “ ‘ foo ’ ” );D . JSON.parse(‘ “ foo ” ’);View AnswerAnswer: D

September 18, 2024No CommentsREAD MORE +

Which line of code properly declares the clothingItem class such that it inherits from Item?

Cloud Kicks has a class to represent items for sale in an online store, as shown below: Class Item{ constructor (name, price){ this.name = name; this.price = price; } formattedPrice(){ return ‘s’ + String(this.price);}} A new business requirement comes in that requests a ClothingItem class that should have all of...

September 18, 2024No CommentsREAD MORE +

Which code should be inserted at the line 03 to set up an event and start the web server?

Refer to the code below: 01 const server = require(‘server’); 02 /* Insert code here */ A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers Which code should be inserted at the line 03 to set up an...

September 18, 2024No CommentsREAD MORE +

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

September 18, 2024No CommentsREAD 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

September 18, 2024No CommentsREAD MORE +

What is the resultof executing line 04?

A developer writers the code below to calculate the factorial of a given number. Function factorial(number) { Return number + factorial(number -1); } factorial(3); What is the resultof executing line 04?A . 0B . 6C . -InfinityD . RuntimeErrorView AnswerAnswer: D

September 18, 2024No CommentsREAD MORE +

What kind of export be leverages so that multiple functions can beused?

A developer has an ErrorHandler module that contains multiple functions. What kind of export be leverages so that multiple functions can beused?A . NamedB . AllC . MultiD . DefaultView AnswerAnswer: A

September 17, 2024No CommentsREAD MORE +

Which option allows the developer to step into each function execution within calculateBill?

A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code: function calculateBill (items) { let total = 0; total += findSubTotal(items); total += addTax(total); total += addTip(total); return total; } Which option allows the developer to step into each function execution within calculateBill?A...

September 17, 2024No CommentsREAD MORE +

What is logged to the console?

Given the code below: const delay = sync delay => { Return new Promise ((resolve, reject) => { setTimeout (resolve,delay);});}; const callDelay =async () => { const yup =await delay (1000); console.log (1); What is logged to the console?A . 123B . 132C . 213D . 231View AnswerAnswer: D

September 17, 2024No CommentsREAD MORE +