January 2018
Beginner
658 pages
13h 10m
English
In the Terminal, we'll run the callback function using node, which is in the playground folder, and we call the file callbacks.js:
node playground/callback.js
When we run the file, right away our data prints to the screen:

We've created a callback function using synchronous programming. Now as I mentioned, this is still a contrived example because there is no need for a callback in this case. We could simply return the user object, but in that case, we wouldn't be using a callback, and the whole point here is to explore what happens behind the scenes and how we actually call the function that gets passed in as ...
Read now
Unlock full access