Can anyone explain to me what is going here?
I have been learning node and callbacks and I am kind of getting the concept but can use some more details.
So in function "myCallback" there is a log to console but in "usingItNow" there is no log to console and the result are "from myCallback From Using it" in the console.
How is it I do not need something like return in usingItNow?
Is this a proper representation for usingItNow if it were not a callback? var usingItNow = 'From Using it'
Can someone post some links to some good tuts?
Is usingItNow proper camelcase or should it be usingItnow?
var myCallback = function(data) {
console.log('from myCallback ' + data);
};
var usingItNow = function(callback) {
callback('From Using it');
};
usingItNow(myCallback);