eloquent javascript recursion exercise