const fs = require('fs').promises;
async function readFile() {
try {
const data = await fs.readFile('myfile.txt', 'utf8');
console.log(data);
} catch (error) {
console.error('Error reading file:', error);
}
}
readFile();
This is the content of myfile.txt