js string calculator based on http://osherove.com/tdd-kata-1/