Skip to content

Instantly share code, notes, and snippets.

@Zensavona
Created October 29, 2012 05:10
Show Gist options
  • Save Zensavona/3971675 to your computer and use it in GitHub Desktop.
Save Zensavona/3971675 to your computer and use it in GitHub Desktop.
What the actual fuck
function say(word) {
console.log(word);
}
function execute(someFunction, value) {
someFunction(value);
}
execute(say, "Hello");
// if you want to be even cleaner...
function execute(someFunction, value) {
someFunction(value);
}
execute(function(word){ console.log(word) }, "Hello");
// or just fucking crazy as shit?
(
function(fn) {
fn();
}(function() {
console.log("hello");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment