3 ms·
It really should be: try{ x = await fs.writeFilePromise("Hello, World", "helloworld.txt") console.log("done!") } catch(error) {
by flavio81 9y ago
It really should be:
try{
x = await fs.writeFilePromise("Hello, World", "helloworld.txt")
console.log("done!")
}
catch(error)
{
console.error(error) // or console.log
}
This takes advantage of promises fully.