🌱  Simple Solution | 2 liner 🚀
\n\n# Code\n\nvar cancellable = function(fn, args, t) {\n    let timeoutId = setTimeout(() => fn(...args), t);\n    return () => clearTimeout(timeoutId);\n};\n\
\n\n# Code\n```\nvar cancellable = function(fn, args, t) {\n    let timeoutId = setTimeout(() => fn(...args), t);\n    return () => clearTimeout(timeoutId);\n};\n\n```
['JavaScript']