Question: Given the code below: function makeAddReset(start) { return function() { return function(amount) { let end = start + amount; start =0; return end; } }

Given the code below: function makeAddReset(start) \{ return function() \{ return function(amount) \{ let end = start + amount; start =0; return end; \} \} \} let addReset = makeAddReset(a); console.log(addReset()(5) + addReset()(6)) If the output of the program is 18 , what the value of a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
