const fs = require("fs");
fs.writeFileSync("./01day/data/" + Math.random() + ".txt", Math.random() + "");
// console.log(data);
// 语法:fs.writeFileSync(path,data[, options])
// 特点:writeFile方法是覆盖式写入,后面的内容会将前面的内容覆盖
// 参数:path,被写入文件的路径(相对路径或绝对路径)
// data,要写入的内容,字符串格式
// options:写入文件的参数配置,默认是utf8编码