Question d’entretien chez Booz Allen Hamilton

How would you design an AI that plays tic-tac-toe against a human using JavaScript?