Iterating over Objects: keys, values, entries
Premium
You used for...of and array methods on arrays in the array methods series. To do the same on the keys or values of an object, JavaScript gives you three helpers: Object.keys, Object.values, and Object.entries. Each one turns an object into an array you can iterate.