Created
June 8, 2018 18:08
-
-
Save justin-lyon/56afc596edda3d4d99cba61b9cc80233 to your computer and use it in GitHub Desktop.
es5 Callbacks
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
var foo = function() { | |
console.log("I'm foo"); | |
}; | |
var bar = function(cb) { | |
console.log("bar before"); | |
cb(); | |
console.log("bar after"); | |
}; | |
bar(foo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment