This is a simple visualization of executing a main function in JavaScript.
In the main function, we simulate a series of events:
- Starting a large image load (3000ms)
- Starting a database query (2500ms)
- Creating a Promise for a Microtask
- Completing the database query
- Completing the image load
- Processing the Promise callback
- Processing the database callback
- Processing the image callback