Node question from a rookie

Hello, I just started the course"Introduction to Javascript" by M. David Green. I installed Node. It seems the version he has is different from the current one (or I have to change my settings somehow…). How do you switch between the terminal and the shell? When I open up Node, the line starts with a “>”. Thank you.

you don’t open Node like you open a desktop app. It’s more like a background process. if you call Node yourself you pass it a script file (something along node mysqcript.js) and that’s it and then any magic can happen that is scripted in that JavaScript file. Additionally Node is a dependency for a lot of other programmes (npm, grunt, etc.).

If you run node without passing a script name it opens a shell where you can execute JS at the prompt interactively.

Typing <ctrl> + <c> twice will exit the node shell and take you back to the terminal.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.