3 ms·
Interesting idea. Just a note that the first answer I saw[0] is not correct. This is given as how to write to a file in Javascript. const {fs} = require('fs')
by chrisbrauns 6y ago
Interesting idea. Just a note that the first answer I saw[0] is not correct.
This is given as how to write to a file in Javascript.
const {fs} = require('fs')
fs.writeFileSync('/tmp/myfile.txt', Buffer.from('hello'));
But you can't just do this in plain old JS. It needs to be Node running ES6+
[0]: https://howtoxwithy.com/how-to/b35668da-7cbe-456f-8db5-0d64522fdd5d https://howtoxwithy.com/how-to/b35668da-7cbe-456f-8db5-0d645...
- alex_portabella 6y agoThat's true. Definitely need a way to distinguish between the two (browser vs. server) sometimes