Exam4Training

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 . Using the debugger command on line 05.
B . Using the debugger command on line 03
C . Calling the console.trace (total) method on line 03.
D . Wrapping findSubtotal in a console.log() method.

Answer: A

Exit mobile version