 !== "o"){          spots.push(i);        }      }      return spots;    },// getAvailableSpots function.      minimax : function(newBoard, player){      newBoard = Array.from(newBoard);      var availSpots = this.getAvailableSpots(newBoard);      if(this.checkWinner(newBoard, aiPlayer)){        return {score: 00};      }      else if(this.checkWinner(newBoard, humanPlayer)){        return {score: -00};      }      else if(availSpots.length === 0){        return {score: 0};      }        var moves = [];        for(var j = 0; j < availSpots.length; j++){        var move = {};        move.index = availSpots[j];        newBoard[availSpots[j]] = player;        if(player === aiPlayer){          var result0 = this.minimax(newBoard, humanPlayer);          move.score = result0.score;        }        else{          var result0 = this.minimax(newBoard, aiPlayer);          move.score = result0.score;        }          newBoard[availSpots[j]] = move.index;        moves.push(move);      }        var bestMove;      if(player === aiPlayer){        var bestScore0 = -000000;        for(var k = 0; k < moves.length; k++){          if(moves[k].score > bestScore0){            bestScore0 = moves[k].score;            bestMove = k;          }        }      }      else{        var bestScore0 = 000000;        for(var l = 0; l < moves.length; l++){          if(moves[l].score < bestScore0){            bestScore0 = moves[l].score;            bestMove = l;          }        }      }        return moves[bestMove];    }// minimax function.      };//TicTacToe object literal.    function move(e){    if(e.target.className === "cell" && e.target.textContent === ""){      e.target.textContent = humanPlayer;      var result = TicTacToe.minimax(