summaryrefslogtreecommitdiff
path: root/public/game.js
diff options
context:
space:
mode:
authorIgrisBRC <[email protected]>2024-07-13 11:38:32 +0530
committerIgrisBRC <[email protected]>2024-07-13 11:38:32 +0530
commit5edc39fcc24d95a7c52e69da49b3853c6d969f4a (patch)
tree6d18901d28e7fd36206c33cc72e6fb4d13862ebe /public/game.js
parent6355b9725ac4e18f8001ff7c9be73e8f78fd1d31 (diff)
refactored the project
Diffstat (limited to 'public/game.js')
-rw-r--r--public/game.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/public/game.js b/public/game.js
new file mode 100644
index 0000000..e720df9
--- /dev/null
+++ b/public/game.js
@@ -0,0 +1,13 @@
+const alphabet = 'abcdefgh'
+//let squares = document.getElementsByClassName("square")
+
+
+for (let i = 0; i < 8; i++) {
+ for (let j = 0; j < 8; j++) {
+ let square = document.getElementById(`${alphabet.charAt(j)}${i + 1}`)
+ //console.log(square)
+
+ square.append("p")
+ }
+}
+