Please help me to solve the problem, how can we return a debounced version of input function. check the code below:
const steven = () => {console.log('steven')}
const debounce = (fn, timeLimit) => {
// what should come here?
}
const debouncedSteeven = debounce(steven, 5000) // returns a debounced version of the input function
window.addEventListener('scroll', debouncedSteeven);