Question: Given the code below: function f(x) { return function (y) { x += A; return function () { y += B; return [x, y];

Given the code below: function f(x) { return function (y) { x += A; return function () { y += B; return [x, y]; } } } let g = f(0); let a = g(0)(); let b = g(0)(); console.log([a[0]+b[0], a[1]+b[1]]); Assume the output of the program is [6, 54], what is the value of 100*A+B?
Step by Step Solution
There are 3 Steps involved in it
Lets analyze the code step by step 1 The function fx is defined which takes one parameter x It retur... View full answer
Get step-by-step solutions from verified subject matter experts
