DEV Community

Discussion on: Symbols in ES6 - A Quick Guide

Collapse
 
brucknert profile image
Tomas Bruckner

Nice article, but I think there is a typo.

const foo = {
name: 'Ben',
age: 25,

}

for(let val of foo) {
console.log(val) // Ben, 25
}

This should throw TypeError, because objects are not iterable. Maybe you meant for...in ?