Introducing the for-of loop
Javascript syntax for the for-of loop
The for-of loop is a new powerful construct in ES6 that simplifies your code.
The for-of loop works for any JavaScript iterable object. We will use the for-of loops on arrays, strings, and NodeLists.
In our first example, let’s log the characters of a string:
Get hands-on with 1400+ tech skills courses.