fill in the blank in the following code so that it imports the fs module and append 'Node.js!' string ot the 'log.txt' file code example
Example 1: how to right plain text format file in node js
var fs = require('fs')
var logger = fs.createWriteStream('log.txt', {
flags: 'a'
})
logger.write('some data')
logger.write('more data')
logger.write('and more')
Example 2: how to right plain text format file in node js
var fs = require('fs')
fs.appendFile('log.txt', 'new data', function (err) {
if (err) {
} else {
}
})