Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Writing to a file

Now it is time to write to a file. 

We will create a string variable with some text of our choice, and we will try to write the content of this text into an empty file. 

First let's remove the previous content from the .txt file. Then after creating the text inside our script we will use the writeFileSync function to write to a file synchronously as it is shown above. When the operation is finished, we can check the content's of the .txt file by opening it. It should have the text you have defined. 

A massive success!!