Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (9.5k points)

Can anyone tell me how to read or write files in JS? 

1 Answer

0 votes
by (19.7k points)

No, you can’t read or write files in JS on the client-side(browsers). You have to use node.js fs library (File-System) to manage all read and write operations on the server-side. 

To write content to the file: 

writeFile(Path, Data, Callback)

To read content to the file: 

readFile(Path, Options, Callback)

Interested in Java? Check out this Java Certification by Intellipaat.

Related questions

0 votes
1 answer
asked Mar 16, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...