Useful ways to find and organize data in objects
Creates an array of all the object’s values
Object.values(), but for the keys
This is a combination of the above. All key-value pairs are returned as arrays, all as an item inside another array. Any objects set as values here stay as objects.
Object spreading lets you add key-value pairs into an object without mutation (it’s a new object).
Prevents an object from being modified or added to again. Useful since
const doesn’t actually do this.
Prevents an object from being added to, but existing properties can be changed.