Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teotimepacreau/promises-and-asyncawait-exercices-day36-of-100daysofcode
Promises and AsyncAwait Exercices from #30daysofjavascript
https://github.com/teotimepacreau/promises-and-asyncawait-exercices-day36-of-100daysofcode
100daysofcode 30daysofjavascript async-await object-destructuring promises-in-javascript
Last synced: about 4 hours ago
JSON representation
Promises and AsyncAwait Exercices from #30daysofjavascript
- Host: GitHub
- URL: https://github.com/teotimepacreau/promises-and-asyncawait-exercices-day36-of-100daysofcode
- Owner: teotimepacreau
- Created: 2023-08-07T08:32:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-07T08:44:18.000Z (over 1 year ago)
- Last Synced: 2023-08-07T09:51:21.570Z (over 1 year ago)
- Topics: 100daysofcode, 30daysofjavascript, async-await, object-destructuring, promises-in-javascript
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Promises and AsyncAwait Exercices from #30daysofjavascript
https://github.com/Asabeneh/30-Days-Of-JavaScript/blob/master/18_Day_Promises/18_day_promises.md# Learned
- Promises are useful when performing a single asynchronous task
- Promises are based on `resolve and reject`, if it `resolves` the `.then` executes, if it `rejects` we `.catch` the error
- Some APIs already have in-built promises as the the fetch API allowing to directly use `.then` and `.catch`
- `Async/Await` : `async` make the function a promise, two blocks similar as `resolve` and `reject` : `try` and `catch`, we put the `await` in the `try` block, `await` allows to wait for the execution of a function before performing a task# 🛠️
Vanilla Javascript