FOR OF Nested Arrays

 


let heroes=[["spiderman","ironman","thor"],["batman","superman","flash"]];

for(list of heroes){
    console.log(list);
    for(hero of list){
        console.log(hero);
    }
}

Comments

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code