Last active
October 15, 2018 11:38
-
-
Save jsrath/3302eb2124615e51a2a22183a3cd1063 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tableContainer = document.getElementById('tableContainer'); | |
let resultsTableBody = document.createElement('tbody'); | |
for (let i = 0; i < allBoxes.length; i++) { | |
let row = document.createElement('tr'); | |
for (let j = 0; j < 8; j++) { | |
let cell = document.createElement('td'); | |
let cellText = document.createTextNode(goalArray[i][j]); | |
cell.appendChild(cellText); | |
row.appendChild(cell); | |
} | |
resultsTableBody.appendChild(row); | |
} | |
tableContainer.appendChild(resultsTableBody); | |
let winner = document.getElementById('winner'); | |
winner.innerText = document.querySelector('tr:first-child td:first-child').innerText; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment