Exercise 5.5

This commit is contained in:
Karan
2021-11-24 19:38:41 +05:30
committed by GitHub
parent a0f8c65fd9
commit 2d93730c0b
+17
View File
@@ -0,0 +1,17 @@
const grid = [];
const cells = 64;
let counter = 0;
let row;
for (let x = 0; x < cells + 1; x++) {
if (counter % 8 == 0) {
if (row != undefined) {
grid.push(row);
}
row = [];
}
counter++;
let temp = counter;
row.push(temp);
}
console.table(grid);