JavaScript · Objects
for…of Object.entries()
The clearest way to iterate own object properties with keys and values.
Syntax
for (const [k, v] of Object.entries(obj))Example
Try it
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.