Skip to content

Instantly share code, notes, and snippets.

@daytonn
Created February 19, 2015 16:58
Show Gist options
  • Select an option

  • Save daytonn/fd5bfda0007ab093955f to your computer and use it in GitHub Desktop.

Select an option

Save daytonn/fd5bfda0007ab093955f to your computer and use it in GitHub Desktop.
CWCPOOJS - callbacks
var myFunction = function() {
console.log("Hello World");
};
var callAnotherFunction = function(anotherFunction) {
anotherFunction();
};
callAnotherFunction(myFunction); // logs "Hello World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment