ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 82 - Certified JavaScript Developer I discussion

Report
Export

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.
Using the debugger command on line 05.
Answers
A.
Using the debugger command on line 05.
B.
Using the debugger command on line 03
Answers
B.
Using the debugger command on line 03
C.
Calling the console.trace (total) method on line 03.
Answers
C.
Calling the console.trace (total) method on line 03.
D.
Wrapping findSubtotal in a console.log() method.
Answers
D.
Wrapping findSubtotal in a console.log() method.
Suggested answer: A
asked 23/09/2024
Harry Meijer
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first