An order that looks logical
When reading logs in the console, the display order often feels like it reflects the real execution order. In practice, this is not always true.
As soon as asynchronous code is involved, the console can give a partial or misleading view.
Mixing synchronous and asynchronous logs
A console.log executed inside a promise, a timeout, or an event handler does not relate to time the same way as a synchronous log.
Placed next to each other, these logs can look inconsistent if execution context is ignored.
What the console does not show
- when a task is scheduled
- when it actually runs
- what has been delayed
Without this information, timing-related bugs remain hard to read.
Reading logs with time in mind
As mentioned in the article about debugging without breakpoints, following the real flow often matters more than isolated values.
Taking time into account helps restore meaning to logs that seemed contradictory 🙂