Housekeeping
1. Demo: randomIndex()
utility function
Materials
2. Error Handling with try...catch
Materials
Slides: Handling Exceptions
3. Demo: Disney Character API
Materials
Breakout Activity: Find the array
You will be working in pairs. Using your knowledge of dot notation, and the randomIndex function created this morning:
fetch
a list of data from an open API;
- isolate the the array of items if it's deeply nested;
- using the
randomIndex()
function, console.log()
(or output to the HTML page) a random item from the list.
4. ES Modules
Materials
Lab Time
Prep
Public JSON APIs
- Using this List of Public APIs, find an endpoint (a URL that returns a
json
object) that returns either an object or an array of objects. You will use this for an activity.
ES Modules
Error handling