Exploring the JavaScript for…of Loop
Introduction The for…of loop lets go through each item in a collection one by one. The for…of loop in JavaScript is used to iterate over iterable objects. This includes arrays, strings, nodeLists, and HTMLCollections. The syntax of this loop is similar to the for/in the loop. The object must be iterable to be used with this loop. Syntax …