Debounce Example

Run Settings
LanguageJavaScript
Language Version
Run Command
function debounce(fn, delay) { let timer; return function(...args) { clearTimeout(timer) setTimeout(() => { fn(args) }, delay) } } let test = debounce(() => console.log('hello'), 1000) let testTwo = debounce(() => console.log('hello two', 500)) test() testTwo()
Editor Settings
Theme
Key bindings
Full width
Lines