Concept Flow - Why promises are used
Start async task
Create Promise
Task runs in background
Promise pending
Resolve
Then
Continue with result or error handling
End
This flow shows how a Promise starts an async task, waits for it to finish, then either resolves or rejects, allowing code to handle success or error.