Challenge - 5 Problems
Node.js Version Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Node.js Version Managers
Which of the following statements about Node.js version managers is correct?
Attempts:
2 left
💡 Hint
Think about how developers manage different Node.js versions for different projects.
✗ Incorrect
nvm (Node Version Manager) is a tool that lets you install and switch between multiple Node.js versions easily on the same computer.
📝 Syntax
intermediate1:30remaining
Correct Command to Install Node.js Version 18 Using nvm
Which command correctly installs Node.js version 18 using nvm?
Attempts:
2 left
💡 Hint
Installing a version is different from switching to it.
✗ Incorrect
The command nvm install 18 downloads and installs Node.js version 18. The nvm use 18 command switches to a version already installed.
❓ component_behavior
advanced1:30remaining
Behavior of Node.js Version After Switching with nvm
After running
nvm install 16 and then nvm use 16, what will node -v output?Attempts:
2 left
💡 Hint
The
nvm use command sets the active Node.js version for the terminal session.✗ Incorrect
After installing and switching to version 16, node -v shows the exact version 16 installed.
🔧 Debug
advanced2:00remaining
Why Does 'node -v' Show a Different Version After Using nvm?
You installed Node.js 18 using nvm and ran
nvm use 18. But running node -v still shows version 14. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if your shell has any aliases or PATH settings overriding nvm.
✗ Incorrect
If node is aliased or the PATH prioritizes another Node.js installation, node -v will show that version despite using nvm.
❓ state_output
expert2:30remaining
Result of Running Multiple nvm Commands Sequentially
Given the following commands run in order:
What is the output of
nvm install 14nvm install 18nvm use 14node -vWhat is the output of
node -v?Attempts:
2 left
💡 Hint
The last
nvm use command sets the active version.✗ Incorrect
After installing versions 14 and 18, the command nvm use 14 activates version 14, so node -v outputs version 14.