const fs = require('fs'); const fileName = process.argv[2]; readFile(fileName, 'utf8', (error, data) => { if (error) { console.error(error.message); return; } console.log(data); code example

Example: const fs = require('fs'); const fileName = process.argv[2]; readFile(fileName, 'utf8', (error, data) => { if (error) { console.error(error.message); return; } console.log(data);

const fs = require('fs');

const fileName = process.argv[2];

readFile(fileName, 'utf8', (error, data) => {
    if (error) {
        console.error(error.message);
        return;
    }
    console.log(data);