Skip to content

Instantly share code, notes, and snippets.

@RedWolves
Created July 24, 2014 16:17
Function Abstractions
var work = function () {
console.log("working hard!");
};
var doWork = function(f) {
console.log("starting");
try {
f();
} catch (ex) {
console.log(ex);
}
console.log("end");
};
doWork(work); // we only pass the reference to work we don't invoke it with ().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment