Test Yourself: Server-side Architecture
Test your knowledge of Node.js, Express, and MongoDB.
Choose the correct answer(s)
1
What happens when the following code is executed?
const fs = require('fs');
fs.appendFile('educative.txt', 'data to append', function (err) {
if (err) throw err;
console.log('Saved!');
});
A)
It throws a runtime error.
B)
It appends to the file synchronously and print Saved!
in the console.
C)
It appends to the file asynchronously and print Saved!
in the console.
D)
It throws a syntax error.
Question 1 of 100 attempted
Get hands-on with 1400+ tech skills courses.