Here is what the above code is Doing:
1. The first console.log(1) is executed.
2. The setTimeout function is invoked. The function passed to setTimeout is added to the callback queue.
3. The next console.log(3) is executed.
4. The next console.log(4) is executed.
5. The next console.log(5) is executed.
7. The function passed to setTimeout is removed from the callback queue and added to the execution queue.
8. The function passed to setTimeout is executed.