- The call to
doSomething()
is made, with2
as the parameter (bound toa
in the function). - The call to
doSomethingElse()
is made, with4
(a * 2
) as the parameter, bound to the symbola
in that inner function. - The inner function returns
3
(a - 1
). - The
doSomething()
function then adds itsa
(still2
) to the result, giving5
, and assigns that tob
. - The
console.log()
call is made, with15
as the argument (b * 3
).
solved How is this 15?