Created
February 23, 2020 22:10
-
-
Save deepal/e35fa0aa6ae52331c37fc1eb87a247b0 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
function writeToMyFile(data, callback) { | |
if (!data) { | |
callback(new Error('No data provided')); | |
} else { | |
fs.writeFile('myfile.txt', data, callback); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment