LegalZoom interview question

Recreate the game battleship in JavaScript