JavaScript Easy Solution | Beats 100% Faster | Beginner's Friendly :)
Code\njavascript []\nconst cancellable = function(fn, args, t) {\n    const cancelFn = function (){\n        clearTimeout(timer);\n    };\n\n    const timer = s
# Code\n```javascript []\nconst cancellable = function(fn, args, t) {\n    const cancelFn = function (){\n        clearTimeout(timer);\n    };\n\n    const timer = setTimeout(()=>{\n        fn(...args)\n    }, t);\n\n    return cancelFn;\n};\n```
['JavaScript']