SyntaxFix
Write A Post
Hire A Developer
Questions
Since ES2015 you can use the for of loop, to access the element directly:
// before ES2015 for(var key of elements){ console.log(elements[key]); } // ES2015 for(let element of elements){ console.log(element); }
Hope this helps someone.