Booz Allen Hamilton Interview Question

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