Skip to content

Instantly share code, notes, and snippets.

@codenamejason
Created March 3, 2015 18:01
Show Gist options
  • Save codenamejason/0f99bac5992df9109267 to your computer and use it in GitHub Desktop.
Save codenamejason/0f99bac5992df9109267 to your computer and use it in GitHub Desktop.
sampleCallback
fs.readFile('/etc/hosts', function(err, contents) {
console.log('contents');
});
// same as below
var callback = function(err, contents) {
console.log(contents);
}
fs.readFile('/etc/hosts', callback);
fs.readFile('/etc/inetcfg', callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment