How do I make a 2 dimensional array?

function createFloatArray2d(rows, cols) {
  return Array.from({ length: rows }, _ => new Float32Array(cols));
}
1 Like