I’ve written what i thought would create an array of 5 arrays each containing 5 arrays of 64 zeroes, but when i write the resulting array to the console, i do not get what i expected to see, yet the code makes sense to me.
Here is my code:
const C = new Array(5);
for (let x = 0; x < 5; x++) {
for (let y = 0; y < 5; y++) {
for (let z = 0; z < 64; z++) {
C[x,y,z] = 0;
}
}
}
console.log(C);
logging C presents me with one array of 64 zeroes. What is wrong?