Creates a 1-dimensional array to fit a grid of rows x cols. Use createArray if you want to create this array and wrap it for grid access.
// Creates an array filled with 0, sized for a grid 10 rows by 20 columnsconst arr = createArray(0, 10, 20);// Alternatively, pass in a gridconst arr = createArray(0, { rows: 10, cols: 20 }); Copy
// Creates an array filled with 0, sized for a grid 10 rows by 20 columnsconst arr = createArray(0, 10, 20);// Alternatively, pass in a gridconst arr = createArray(0, { rows: 10, cols: 20 });
Number of rows, or a grid to use the settings of
Optional
Columns
Creates a 1-dimensional array to fit a grid of rows x cols. Use createArray if you want to create this array and wrap it for grid access.