A kata with JavaScript