Created
September 27, 2017 18:25
-
-
Save glocore/3378440b6eab8c912baed51f4b918f09 to your computer and use it in GitHub Desktop.
debounce function example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function greet() { | |
console.log('hello') | |
} | |
var debouncedFunction = _.debounce(greet, 500) | |
window.addEventListener('scroll', debouncedFunction) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment