As the title, How can I run realtime function and debounce function in the same callback function such as
input.addEventListener('keyup', function () {
realtimeFn()
_.debounce(debounceFn, 1000) // how to code here...
})
function realtimeFn () { console.log(1) }
function debounceFn () { console.log(2) }
I want to log 1
every time and log 2
after all keyup and 1 second.