I have been trying to figure out how to create a multidimensional array like this: [[A1, B1, C1....],[A2, B2, C2....]];
let grid = [
[]
];
let letters = "abcdefghij".toUpperCase();
// Generating the Grid
const generateGrid = (size) => {
let row = 0;
let col = 0;
for (row = 0; row < size; row++) {
grid[row] = [];
for (col = 0; col < letters.length; col++) {
grid[row][col] = `${letters[row]}${col + 1}`;
}
}
};
generateGrid(letters.length);
console.log(grid);