Javascript exercise to calculate the score of the cards on hand