Answers for "Iterating over a multidimensional array"

0

Iterating over a multidimensional array

var cubes = [["string", "string"], ["string", "string"]];

for(var i = 0; i < cubes.length; i++) {
    for(var j = 0; j < cubes[i].length; j++) {
        console.log(cubes[i][j]);
    }
}
Posted by: Guest on June-21-2021

Browse Popular Code Answers by Language