title: Creating SPA tic-tac-toe game with arrays and basic js knowledge
body: <p>I am trying to make a SPA tic tac toe. Something is very off with my logic and I really need help. This is my first project and attempt at coding so please be gentle =)</p>
  
  <pre><code>const store = require('./../store')
  
  const board = ['', '', '', '', '', '', '', '', '']
  // select user token
  const newGame = []
  
  const updateGame = function setToken(id) {
    if (id === 'x') {
      board.user = '"x"'
      board.opponent = '"o"'
    } else if (id === 'o') {
      board.user = '"o"'
      board.opponent = '"x"'
    }
  
    // set current player
    function setCurrentPlayer(player) {
      board.currentPlayer = 'player'
    }
  
    // mave move and switch player
    function makeMove(id) {
      for (let i = 0; i &lt; 9; i++) {
        $(`#${i}`).text('')
      }
      // function to make move on the id passed
      if (board.currentPlayer === 'user') {
        // get element by id
        $('cell' + id).click(board.currentPlayer)
        // if current player selects a cell add id
        $('cell' + id).removeAttr('onClick')
        // if current player selects a cell on get game switch current Player
        onGetGame()
        setCurrentPlayer('opponent')
      } else if (board.currentPlayer === 'opponent') {
        $('cell' + id).click(board.user)
        $('cell' + id).removeAttr('onClick')
        onGetGame()
        setCurrentPlayer('user')
      }
      board.moves++
      // next player move ??
    }
  
    const checkforWin = [
      [0, 1, 2],
      [3, 4, 5],
      [6, 7, 8],
      [0, 3, 6],
      [1, 4, 7],
      [2, 5, 8],
      [0, 4, 8],
      [6, 4, 2]
    ]
    // possible cells for winning
    function playerWin(id) {
      return board.checkforWin.some(function(cell) {
        return board.every(function(cell) {
          return board[cell] === id
        })
      })
    }
  
    // illegal move
    const illegalMove = function cellTaken(id) {
      if (id.cell.value.length === 0) {
        // if length of id is longer than 0
        return !
          //return false
          console.log('Space taken, try another space!')
      } else if (id.value.length === 1) {
        return true
        // if else return true
      }
      // tied game
      let tieGame = function(cellTaken) {
        return (board.every.(cellTaken))
        return true {
          console.log('DRAW!')
        }
      }
    }
  }
  </code></pre>
  
  <p>I have a linter error on this line. I'm attempting to use the .every method to have cellTaken function run and verify if the all the cells are filled to call a draw.    </p>
  
  <pre><code> return (board.every.(cellTaken))
  </code></pre>