Skip to content

Commit

Permalink
#12 ファイル書き込みプログラムを追加.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanakaryo committed May 6, 2024
1 parent a0afae8 commit 384db07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nodejs/app3/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const fs = require('fs');
let text = "この内容をファイルに書き出します。";
fs.writeFileSync('testWrite.txt', text, (err) => {
if (err) throw err;
})
console.log("ファイル書き込み完了.")
1 change: 1 addition & 0 deletions nodejs/app3/testWrite.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
この内容をファイルに書き出します。

0 comments on commit 384db07

Please sign in to comment.