diff options
author | elioat <{ID}+{username}@users.noreply.github.com> | 2024-06-13 15:58:39 -0400 |
---|---|---|
committer | elioat <{ID}+{username}@users.noreply.github.com> | 2024-06-13 15:58:39 -0400 |
commit | 4b1fb59f84a586cab926dec491e75e3174bae541 (patch) | |
tree | 84f0743bf8c652d0e7088b3081f83ecfa45e1f1a /js | |
parent | 7bc40a35ef259798c9e76b1cf084f5b52b4ec64a (diff) | |
download | tour-4b1fb59f84a586cab926dec491e75e3174bae541.tar.gz |
*
Diffstat (limited to 'js')
-rw-r--r-- | js/pi.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/pi.js b/js/pi.js new file mode 100644 index 0000000..b15e62f --- /dev/null +++ b/js/pi.js @@ -0,0 +1,14 @@ +// read in pi, ../10000.pi.txt + +const fs = require('fs'); + +fs.readFile('../10000.pi.txt', 'utf8', (err, data) => { + if (err) { + console.error(err); + return; + } + const string_pi = data; + const big_pi = parseFloat(data); + console.log(big_pi); +}); + |