Created
September 4, 2019 13:41
-
-
Save zolotyh/e42a811bd28a75136678902fc868791a 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
'use strict' | |
const fs = require('fs').promises; | |
function write(){ | |
return fs.mkdir('./tmp').then(function(){ | |
fs.writeFile('./tmp/foo.txt', 'Hello World'); | |
}).catch((err) => { | |
/// handle error | |
console.log(err); | |
}); | |
} | |
write(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment