Very simple cash register code (JavaScript) from CodeAcademy exercise.