Skip to content

Instantly share code, notes, and snippets.

@SomeoneWeird
Created August 10, 2012 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SomeoneWeird/3314985 to your computer and use it in GitHub Desktop.
Save SomeoneWeird/3314985 to your computer and use it in GitHub Desktop.
function readfile(callback) {
// read your file here
filedata = nonexistantmethod(filename);
callback(filedata);
}
readfile(function(contents) {
console.log(contents); // < filename contents
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment