Pinewood Technologies Interview Question

Create an AI for Tic-Tac-Toe using JavaScript.