Javascript Object for Tic Tac Toe game
问题 Complete newbie here on the Javascript topic. I am trying to code out a Tic Tac Toe game, while using JS' Objects to save code space. I figured I might create a JS Object which will all 9 fields defined in the HTML code with ids 'one' to 'nine' as values, and then also have a custom method which can be used to swap value's textContent as follows: var fields = { one: document.querySelector('#one'), two: document.querySelector('#two'), three: document.querySelector('#three'), four: document