Coding game - Javascript