Checkout this video:
– Using the Node.js REPL
– Using the eval() function
We’ll also show you how to save and load your code in the REPL, and how to exit the REPL when you’re finished.
To test if Node.js has been properly installed, you can type the following into your terminal:
If you see a version number printed, then Node.js has been successfully installed on your computer.
If everything went well, you should see the output of your program. For example, if your file contains a console.log statement, that text will be printed to the terminal.