JSFiddle - React, Tailwind, and code Playground

by novikov433

JavaScript

topPremierLeagueScorers.push({
           author,
          date,
            url
         });
       });

      console.log(topPremierLeagueScorers);
      })
     .catch(console.error);


     const fs = require("fs");
 
fs.writeFile("hello.txt",topPremierLeagueScorers, function(error){
 
    if(error) throw error; // если возникла ошибка
    console.log("Асинхронная запись файла завершена. Содержимое файла:");
    let data = fs.readFileSync("hello.txt", "utf8");
    console.log(data);  // выводим считанные данные
});