Data is at the heart of every program, and your JavaScript programs are no different:
- JavaScript is loosely typed, which means variable types can mutate if needed.
- Booleans are simple true/false statements.
- Numbers are non-differentiated between integers, floats, or other types of numbers.
- Arrays and sets can contain a lot of data and make organizing our data easier.
- Objects are key-value pairs that efficiently store data for O(1) retrieval.
- API calls are actually not that scary!
We've taken a closer look at data types, APIs, and JSON. What we've discovered is that data is very flexible in JavaScript, up to and including manipulating the prototypes of the objects themselves. Taking a look at JSON and APIs, we've successfully used fetch() to perform our first API calls.
In the next chapter, we'll dive further into writing JavaScript to make a more interesting application, as well as understanding the details of how to construct one!