Trying to learn javascript with Battleship.