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.
const arr = createArray(0, { rows: 10, cols: 20 }); Copy
const arr = createArray(0, { rows: 10, cols: 20 });
Initial value to fill array
Grid shape to make
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.