For Of
Loop array
var arr = [1,2];
for(let val of arr){
console.log(val);
}
// output
1
2Iterare over arguments ( without converting it to array )
// else you might have done Array.from(arguments).forEach()
function getVal(){
for(let val of argumants){
console.log(val);
}
}Loop over dom nodes without converting it to array
Loop with index
Obeject literal not iterable
Iterate Set
Iterate Map
Last updated