Input: const cancel = cancellableTimeout(console.log, 100, "Hello"); cancel(); Output: The pending log is canceled.
Schedule a callback after a delay and return a function that cancels the pending invocation.