const obj = { a: 1, b: 2, c: 3, d: 4 } for (const key in obj) { console.log( obj[key] ) } // Result: 1, 2, 3, 4
// for... in for (let i in str) { console.log(str[i]); }