Read 03 Async - 401-advanced-javascript-hanna-alemu/seattle-javascript-401d31 GitHub Wiki
Async functionality is when functions go on and do their own processes asynchronously and don't wait for the other to return the things they need. Instead, they use placeholders for the values they wanted and go about their way. This can be achieved using callback functions and promises.
Callback functions have two rules.
1.Error(shows an error if something went wrong)
- Success(shows results or null if no results.
Promises are Async functions that return either a success or a failure answer but the promise is that when a request is made, a response is always expected. We usually use "then" and "catch" to determine success or failure situations.