- The call to
doSomething()is made, with2as the parameter (bound toain the function). - The call to
doSomethingElse()is made, with4(a * 2) as the parameter, bound to the symbolain 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, with15as the argument (b * 3).
solved How is this 15?