Last active
August 20, 2018 09:50
-
-
Save enkot/c8d60e2de51a50b8d754bb5b045b8c87 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 log(func) { | |
return function() { | |
func() | |
console.log('Function called') | |
} | |
} | |
function getData() { ... } | |
getData = log(getData) | |
getData() // in console: Function called |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment