const fs = require('fs');
const writeStream = fs.createWriteStream('./ws_1.txt'); // 없는 경우 생성
writeStream.on('finish', () => {
console.log('file edited');
});
let i = 15;
while (i > 0) {
writeStream.write(`i: ${i.toString(2)} \n`);
i >>>= 1;
}
writeStream.end();