loop through in object key code example
Example 1: loop key in object
const fruits = { apple: 28, orange: 17 }
for(key in fruits){
console.log(key)
}
Example 2: iterate over object javascript
// For a functional one-liner
Object.keys(pokemons).forEach(console.log);
// Bulbasaur
// Charmander
// Squirtle
// Pikachu