We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Node.js

If you've used Python before, you're familiar with running a Python script like this:

python main.py

Similarly, if you install the Node.js toolchain on your local machine, you'll be able to run

node main.js

Before Node, the only way to run JavaScript code was in the browser. Of course, you can still do that using your browser's dev tools!

NVM

I use "Node Version Manager" to manage my Node.js installation. NVM makes it easy to:

  • Install multiple versions of Node
  • Update your Node version
  • Keep your Node version configurations separate on a per-project basis

It's kinda like pyenv for Python, if you're familiar with that.

Assignment

22.14.0

This allows you to simply type nvm use in your CLI while in the root of your project to activate the correct version of node! You may get an installation command to run if you don't yet have that version of node, but it's just another one-liner.

Check to make sure you've activated the correct version of node by typing:

node --version
# Prints: v22.14.0
Hello, World!

Run and submit the CLI tests.