PHP and Javascript solutions to the moderate challenge #138 - Car race