Node.js · Junior · Question 53 of 75

How do you append a line to a file using promises?

Explanation

writeFile replaces the whole file by default. appendFile adds to the end and creates the file if it doesn't exist.

Further reading

Problem with a question

Node.js · Junior · question 53

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz