O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 16 de 22 · Mídia

Write to a file

Kostas Diakogiannis

Write to a file

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!!

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?