making a 2D array containing numbers
function makeArray ( n ) { let arr = new Array ( n ) ; for ( var i = 0 ; i < arr . length ; i ++ ) { arr [ i ] = new Array ( 2 ) ; } let c = 1 ; for ( let i = 0 ; i < n ; i ++ ) { for ( let j = 0 ; j < n ; j ++ ) arr [ i ] [ j ] = c ++ ; } return arr ; }