Can JavaScript be used to read and write to a file? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can JavaScript be used to read and write to a file?

.js file operations

21st Dec 2016, 11:47 PM
sirspy
sirspy - avatar
3 Answers
+ 2
It can be. But it's not design for that, so it's often a little difficult and limited... if you think JS in browser ( for security reasons, a script wouldn't normally access to the user's files system -- but if you are the user, you may succeed in cicumventing ). If you are thinking to NodeJS, it's more made for, but it means installing a server. Searches on google would bring you many examples ^^
22nd Dec 2016, 12:16 AM
visph
visph - avatar
+ 1
take a look at NodeJS.
22nd Dec 2016, 1:17 AM
ADEL MAHJOUB
ADEL MAHJOUB - avatar
+ 1
Thanks.. I will take a look at Node.js
7th Jan 2017, 4:06 PM
sirspy
sirspy - avatar