0
0
Node.jsframework~20 mins

Node.js installation and version management in Node.js - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Node.js Version Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Node.js Version Managers
Which of the following statements about Node.js version managers is correct?
Anvm allows you to install and switch between multiple Node.js versions on the same machine.
Bnvm is a built-in Node.js command that updates Node.js automatically.
Cnvm installs Node.js globally and does not support multiple versions.
Dnvm is a package manager like npm used to install Node.js packages.
Attempts:
2 left
💡 Hint
Think about how developers manage different Node.js versions for different projects.
📝 Syntax
intermediate
1:30remaining
Correct Command to Install Node.js Version 18 Using nvm
Which command correctly installs Node.js version 18 using nvm?
Anvm install 18
Bnvm use 18
Cnvm setup 18
Dnvm get 18
Attempts:
2 left
💡 Hint
Installing a version is different from switching to it.
component_behavior
advanced
1: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?
Av14.x.x (the default system Node.js version)
Bv18.x.x (the latest Node.js version)
CError: Node.js version not found
Dv16.x.x (the exact installed version 16)
Attempts:
2 left
💡 Hint
The nvm use command sets the active Node.js version for the terminal session.
🔧 Debug
advanced
2: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?
AThe terminal session was not restarted or reloaded after running <code>nvm use 18</code>.
BNode.js 18 was not installed correctly by nvm.
CThe <code>node</code> command is aliased to version 14 in your shell configuration.
Dnvm does not support switching Node.js versions on your operating system.
Attempts:
2 left
💡 Hint
Check if your shell has any aliases or PATH settings overriding nvm.
state_output
expert
2:30remaining
Result of Running Multiple nvm Commands Sequentially
Given the following commands run in order:
nvm install 14
nvm install 18
nvm use 14
node -v
What is the output of node -v?
Av18.x.x (Node.js version 18 active)
Bv14.x.x (Node.js version 14 active)
CError: No Node.js version active
Dv16.x.x (some other version)
Attempts:
2 left
💡 Hint
The last nvm use command sets the active version.