When to use for..of and for..in in Javascript? Looping through Arrays and Objects By definition, the main difference between for..of and for..in is on where each of them looks as they loop through an array or object. As explained on Stackoverflow by ...

Markdown supported · ⌘↵ to post
drxlopez
Dinys Monvoisin
Software developer, JavaScript Euthusiasts, Inspiring Blogger
Would not it better off saying that
for...ofis used with array type values only rather than saying it generates an error message?