diff --git a/Chapter 5/Exercise 5.5 b/Chapter 5/Exercise 5.5 new file mode 100644 index 0000000..0e46e7d --- /dev/null +++ b/Chapter 5/Exercise 5.5 @@ -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);