es5 to es6 for loop code example
Example 1: modern javascript for loop syntax
let friends=["jony","tom","Tejas"];
for(elements of friends){
console.log(elements);
}
Example 2: es6 for-of loop
for (let itme of list) {
...
}
let friends=["jony","tom","Tejas"];
for(elements of friends){
console.log(elements);
}
for (let itme of list) {
...
}