Day 6
- Take Home Review
- Promises and Callbacks
- Daily Challenge
- APIs
- JSON
- Take Home Challenge
- Questions?
- MDN Reference: Promise
- States
- Pending
- Resolved
- Rejected
- Methods
.catch()
.then()
.finally()
Promise.all()
- new Promise()
- Chaining methods
- Async / Await
- MDN Reference: Async / Await
- Error Handling
try
catch
- Additional Reading: How to use Async Await in Javascript
- W3Schools Reference: Callbacks
this
keyword
- What is the output for the following examples?
See the Pen JS4B - Day 6 Daily Challenge by Geekwise Academy (@geekwise) on CodePen.
- Questions?
- What is an API?
- Additional Resource: What is an API (Video)
- How do we access an API?
- What is JSON?
- MDN Reference: JSON
JSON.parse()
JSON.stringify()
- Create a new pen in codepen
- Make a reaquest to this Cat Facts API
- Get a random cat fact
- Display the cat fact in an alert