nark: 1
Total Marks: 50
(14)
Vol 8
Font: Microsoft Sans Serif
Size: 10
Time Left:57:11
Multiple Choices
(Choose 1 answer)
What does the code shown below do?
const fs = require('fs'); const os = require('os');
const system = os.platform(); const user = os.userInfo().username;
fs.appendFile('hello.txt', 'Hello ${user} on ${system}', (err) => { if (err) throw err; console.log('The data was appended to file!');}
);
A. Creates a text file hello.txt and appends customized text
B. Creates a file named data and append numbers
C. Console logs system information
D. Creates an image file