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..1f20764 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) @@ -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++) {