the coffee machine code kata solved with javascript