diff --git a/problem/implement-basic-debounce_en.md b/problem/implement-basic-debounce_en.md index a74ae43d..8f09899e 100644 --- a/problem/implement-basic-debounce_en.md +++ b/problem/implement-basic-debounce_en.md @@ -1,4 +1,18 @@ -There is no solution yet. +function debounce(func, wait) { + // your code here + + let timer + return function(...args){ + clearTimeout(timer) + timer = setTimeout(()=>{ + func.apply(this,args) + },wait) + + } +} Would you like to [contribute to the solution](https://github.com/BFEdev/BFE.dev-solutions/blob/main/problem/implement-basic-debounce_en.md)? [Contribute guideline](https://github.com/BFEdev/BFE.dev-solutions#how-to-contribute) + + +