Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

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

Helpless Hoopoe answered on April 12, 2021 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • var http = require('http'); var fs = require('fs'); http.createServer((req,res)=>{ fs.readFile('test.txt',(err,data)=>{ res.write(data); res.end(); // console.log('server running...') }) }).listen(8080)

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

    0
    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: fs whatever
    Link to this answer
    Share Copy Link
    Contributed on Apr 12 2021
    Helpless Hoopoe
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.