Answers for "create multidimensional array javascript for loop"

0

create multidimensional array javascript for loop

var squares = new Array();
for(var i = 0; i <= 8; i++)
{
    squares[i] = new Array();
    for(var j = (i * 20) + 1; j <= 20 * i + 20; j++)
        if (squares[i] == null)
            squares[i] = j;
        else
            squares[i].push(j);
}
Posted by: Guest on February-18-2021

Code answers related to "create multidimensional array javascript for loop"

Code answers related to "Javascript"

Browse Popular Code Answers by Language