JS tic-tac-toe exercise