P5JS error showing up

function createArray2d(rows, cols) {
  return Array.from({ length: rows }, _ => Array(cols).fill());
}
2 Likes