So far we haven't used Node APIs, the Callback Queue, or the Event Loop. The next example will use all four (Call Stack, the Node APIs, the Callback Queue, and the Event Loop). As shown on the left-hand side of the following screenshot, we have our async example, exactly the same as we wrote it in the last section:

In this example, we will be using the Call Stack, the Node APIs, the Callback Queue, and the Event Loop. All four of these are going to come into play for our asynchronous program. Now things are going to start off as you might expect. The first thing that happens is we run the main function by adding it on to the Call Stack. This tells a V8 to kick off the code we have on the left side in the previous screenshot, shown here again:
console.log('Starting app');
setTimeout(() => {
console.log('Inside of callback');
}, 2000);
setTimeout(() => {
console.log('Second setTimeout');
}, 0);
console.log('Finishing up');
The first statement in this code is really simple, a console.log statement that prints Starting app to the screen:

This statement runs right away and we move on to the second statement. The second statement is where things start to get interesting, this is a call to setTimeout, which is indeed a Node API. It's not available inside a V8, it's something that Node gives us access to:
