有什么想法,如果文件中只有4行文字,为什么下面的代码会输出“已加载7个帐户”?谢谢
const fs = require('fs');
let data = fs.readFileSync('./AccountsToBeMade.txt', 'utf8');
if (data) {
let accounts = data.toString().split('\n');
console.log(`Loaded ${accounts.length.toLocaleString()} accounts`);
}
else {
console.log(`No accounts loaded`);
process.exit();
}