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

January 13, 2021 No Comments READ MORE +

How should this expression be modified to ensure that evaluates to false?

Refer to the expression below: Let x = (‘1’ + 2) == (6 * 2); How should this expression be modified to ensure that evaluates to false?A . Let x = (‘1’ + ‘ 2’) == ( 6 * 2);B . Let x = (‘1’ + 2) == ( 6...

January 13, 2021 1 Comment READ MORE +

Which three console logging methods allow the use of string substitution in line 02?

A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented. 01 function logStatus(status){ 02 console./*Answer goes here*/{‘Item status is: %s’, status}; 03 } Which three console logging methods allow the use of string substitution in line 02?A . AssertB...

January 13, 2021 1 Comment READ MORE +

Which two test approaches describe the requirement?

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

January 12, 2021 No Comments READ MORE +

Which two methods are used to address this?

In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default. Which two methods are used to address this? Choose 2 answersA . Use the document object instead of...

January 12, 2021 1 Comment READ MORE +

Where can the developer see the log statement after loading the page in the browser?

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 tootsC . Browser javaScript consoleD...

January 12, 2021 No Comments READ MORE +

Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly populated?

A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count. The Code shown Below: Class Post { // Insert code here This.body =body This.author = author; this.viewCount = viewCount; } } Which statement should be...

January 12, 2021 No Comments READ MORE +

What are the values for first and second once the code executes?

Refer to code below: Let first = ‘who’; Let second = ‘what’; Try{ Try{ Throw new error(‘Sad trombone’); }catch (err){ First =’Why’; }finally { Second =’when’; } catch (err) { Second =’Where’; } What are the values for first and second once the code executes?A . First is Who and...

January 12, 2021 No Comments READ MORE +

What is the value of a?

Given the following code: Let x =(‘15’ + 10)*2; What is the value of a?A . 3020B . 1520C . 50D . 35View AnswerAnswer: A

January 12, 2021 No Comments 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 12, 2021 No Comments READ MORE +