hard
en
2 min
Featured
$1.00
Coding — JavaScript Snippet 1
Type a real JavaScript function with symbols, brackets and indentation for coding speed practice.
0.0 (0) 0 uses 49 views 120s
function debounce(fn, delay) { let timer = null; return function(...args) { if (timer) clearTimeout(timer); timer = setTimeout(() => fn.apply(this, args), delay); }; } const log = debounce((value) => console.log("value:", value), 250);