Long time ago I saw a Javascript challenge, I do not remember where, but now I am trying to solve it. Until now, I do not know how to proceed.
I have this function and I have to make a call such that it returns 8:
function foo(a, b){
b(function(){
return a + a;
});
}
Since foo
does not return anything, is it possible to make the call I need? or it is just a tricky question?