Answers for "fs readfile not working"

0

fs readfile not working

const content = fs.readFileSync('./Index.html', 'utf8');
console.log(content);
Posted by: Guest on September-30-2020
5

fs.readfile

fs.readFile('filename', function read(err, data) {
    if (err) {
        throw err;
    }
    var content = data;
  
    console.log(content);  
   
});
Posted by: Guest on April-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language