JavaScript Promises
2021-9-12 Less than 1 minute
# JavaScript Promises
# What are the three states of a Promise?
- Pending - Initial State
- Resolved - Completed Promise
- Rejected - Failed Promise
# How do promises seek to resolve the issues of "callback hell"?
They make the code look cleaner and easier to read. They use a process calling chaining.
# What is the difference between .then() and .catch()?
.then()
is only used for resolved Promises..catch()
is used if the Promise gets rejected where you can console log the error or a message.
# Daily Challenge
no daily challenge - no class Gregslist V2 (opens new window)