Last active
August 29, 2015 14:15
-
-
Save thomasfr/414b98224059d06d8db0 to your computer and use it in GitHub Desktop.
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
var foo = function(text, callback) { | |
if(text == "hello") { | |
callback("hello world"); | |
console.log("Someone said hello"); | |
} | |
callback("why don't you say hello?"); | |
console.log("nobody likes me :("); | |
} | |
foo("hello", function(result) { | |
console.log(result) | |
}); | |
foo("asdasdasd", function(result) { | |
console.log(result) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment