From b24b4ef794efbf9709be2319742cd9d53cd779e1 Mon Sep 17 00:00:00 2001 From: ruru-dev Date: Wed, 8 Feb 2023 19:09:28 -0600 Subject: [PATCH 1/2] commit initial --- index.html | 18 ++++++++++++++---- scripts.js | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 19d0dee..ca9daec 100644 --- a/index.html +++ b/index.html @@ -17,11 +17,21 @@

Welcome to Tic Tac Toe

- + - - - + + + + + + + + + + + + + diff --git a/scripts.js b/scripts.js index ba09e74..bbddb88 100644 --- a/scripts.js +++ b/scripts.js @@ -44,7 +44,7 @@ const addMarker = (id) => { console.log(`Therefore, a "${currentMarker}" should be placed in the square with the id: ${id}`) // @TODO-2: Build a line of code that will set the innerHTML property of the element that was clicked to the "currentMarker" - + document.getElementById(id).innerHTML = currentMarker; // @TODO-2.5: MIX & MATCH, You will need the following pieces of code to build that line: // = currentMarker // .getElementById(id) From 15b429e8966fdd1f9cc06ddd7821fb01b29791db Mon Sep 17 00:00:00 2001 From: ruru-dev Date: Wed, 8 Feb 2023 23:19:04 -0600 Subject: [PATCH 2/2] add funtionality --- scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts.js b/scripts.js index bbddb88..1f20764 100644 --- a/scripts.js +++ b/scripts.js @@ -93,7 +93,8 @@ const resetBoard = () => { // = // document // const - + let squares = document.getElementsByTagName("td"); + // loops over the HTML Collection of TDs and clears out the Xs and Os for (i=0; i < squares.length; i++) {