In this session, I am going to explain about fs module to read the file and write content to a file. And their code to memorize to use them for your future endeavors.
Using fs to read both synchronously and asynchronously :
most for the time we asynchronous code to write in rare cases you will use synchrounous.
code for asynchronous for reading file and writing file:
code for synchronous writing and reading file: