basics of a javascript board game

Clicking on any one of the squares changes the colors of all three.