JSFiddle - React, Tailwind, and code Playground

by dshilkret

JavaScript

function ChessManager(move) {
  this.moves = [];
  this.makeMove = function(move) {
  	this.moves.push(move);
   
  };
  this.newGame = function() {
   console.log(moves[0]);
    moves.clear();
  };
}

ChessManager("test");