let obj = {
name: 'Smith',
age: 30,
country: 'Korea'
};
for(let prop in obj){
console.log(prop);
}
// output
name
age
country
let arr = ['a', 'b', 'c'];
for(let el of arr){
console.log(el);
}
// output
a
b
c
let arr = ['a', 'b', 'c'];
arr.forEach(el => console.log(el));
// output
a
b
c