Creates a function that invokes fn only after it has been called n times.
The returned function will call fn after the specified number of invocations.
Until then, it returns undefined. After the first successful call, the result
of fn is cached and returned on subsequent calls.
Creates a function that invokes
fn
only after it has been calledn
times.The returned function will call
fn
after the specified number of invocations. Until then, it returnsundefined
. After the first successful call, the result offn
is cached and returned on subsequent calls.