Does “for…of” loop iteration follow the array order in JavaScript?
Iterating over an array using for…in doesn’t guarantee order, however ES6 introduces a new construct for…of. My limited testing of implementations of for…of indicates that it does iterate in order on array, but is this property guaranteed? Yes, the order of for-of on arrays is guaranteed by the array iterator definition: It will visit the … Read more