Dawson's Chess

JavaScript
The game is played on a row of squares initially empty. Players move
alternately by placing an X in one of the empty squares, subject to the
restriction that an X may not be placed in a square adjacent to another X.
The last player to move wins.

To help to see the position better, O's are placed in the empty squares
where it is forbidden to move.

You move first.
You can win from the initial position, but don't make any mistakes!