function firstFunction(num, callback) {
callback(num);
};
function secondFunction(num) {
return num + 99;
};
console.log(firstFunction(56, secondFunction));
undefined
If I call console.log
from within secondFunction
, it returns the value.
Why not? What's the point of setting up callbacks if I can't get the value out of them to use later? I'm missing something.