Function Callbacks: Solved

Make this set of assertions work:

console.assert(factory3('function nirvana')() === 'function nirvana')

console.assert(factory3(100)() === 100)

Resolved:

var factory3 = function(input) { someFunction = function() { return input } return someFunction }

Why? Factory3, which takes any input as its parameter, returns the nested someFunction function, which returns the original input.

Function nirvana reached. Namaste. 🙏