times = function (i, f) { if (i === 0) return; f(); times (i-1, f) } hi = () => {print("hi!");} times(4, hi);
Output