GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 17 von 22 · Medien

Write to a file async

Kostas Diakogiannis

Write to a file async

Write to a file async

Exactly like we have done with reading the file, we will use the fs.promise module to write to a file asynchronously and don't block our script from further execution. For that we will use the fs.write function of the filesystem and will wrap it as previous into a promise (in order to avoid callback hell) as it is shown above.

Give it a go and test that your file contains what you want.

 

 

 

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck