Last active
March 4, 2017 05:08
-
-
Save PantherHawk/088b5d9f0e72f642bec9fbef8261c66c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A S Y N C H R O N O U S FXN USING A C A L L B A C K | |
var fetchFile = function(filePath, callback) { | |
readFile(filePath, (err, contents) => { | |
if (err) { | |
return callback(err); | |
} else { | |
callback(contents); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment