Tic Tac Toe in JavaScript