console.log("A");
console.log("B");
console.log("C");What does this print, and why can you be sure of the order?
- a"A", "B", "C"✓
- bThe order isn't guaranteed, since each console.log is scheduled as a separate task
- c"C", "B", "A" — Node evaluates statements in reverse order because of hoisting
- dIt depends on which event loop phase is active when the script starts running
Explanation:There is no asynchronous operation here at all. Node executes synchronous statements one at a time, in source order, on a single JavaScript thread. Nothing defers
console.log("B") or console.log("C"), so the output is always "A", "B", "C".