Computer Science, asked by pandeyshubham7279, 11 months ago

Define array in two dimensional array in javascript

Answers

Answered by nisha414
2
To create a 2D array in javaScript we can create an Array first and then addArrays as it's elements. This method will return a 2D array with the given number of rows and columns. function Create2DArray(rows,columns) { var x = new Array(rows); for (var i = 0; i < rows; i++) { x[i] = new Array(columns); } return x; }

lovemeeee: hiii
Similar questions