Syntax error

Report a typo

This code has an error. Try to guess what will be the error message.

const { writeFile } = require("node:fs");

fs.write("happy-file.txt", "Don't worry, be happy", (err) => {
    if (err) {
        console.log(err);
    }
});
Select one option from the list
___

Create a free account to access the full topic