Very simple cash register written in JavaScript