0
0
Node.jsframework~10 mins

Node.js installation and version management in Node.js - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check the installed Node.js version.

Node.js
console.log(process.[1]);
Drag options to blanks, or click blank then click option'
Aversion.node
Bversion
Cversions.node
DnodeVersion
Attempts:
3 left
💡 Hint
Common Mistakes
Using process.version which returns a string but not the exact Node.js version property.
Trying to access a non-existent property like process.nodeVersion.
2fill in blank
medium

Complete the command to install Node.js version 18 using nvm (Node Version Manager).

Node.js
nvm [1] 18
Drag options to blanks, or click blank then click option'
Ainstall
Bswitch
Csetup
Duse
Attempts:
3 left
💡 Hint
Common Mistakes
Using nvm use 18 before installing the version.
Trying nvm setup 18 which is not a valid command.
3fill in blank
hard

Fix the error in the command to switch to Node.js version 16 using nvm.

Node.js
nvm [1] 16
Drag options to blanks, or click blank then click option'
Ause
Binstall
Cswitch
Dselect
Attempts:
3 left
💡 Hint
Common Mistakes
Using nvm switch 16 which is not recognized by nvm.
Trying nvm select 16 which is invalid.
4fill in blank
hard

Fill both blanks to list all installed Node.js versions and set the default version to 14.

Node.js
nvm [1]
nvm alias default [2]
Drag options to blanks, or click blank then click option'
Alist
Bdefault
C14
Duse
Attempts:
3 left
💡 Hint
Common Mistakes
Using nvm use instead of nvm list to show versions.
Setting default to a command word instead of a version number.
5fill in blank
hard

Fill all three blanks to create a script that prints the current Node.js version and switches to version 12.

Node.js
console.log(process.[1]);
nvm [2] [3]
Drag options to blanks, or click blank then click option'
Aversions.node
Buse
C12
Dversion
Attempts:
3 left
💡 Hint
Common Mistakes
Using process.version instead of process.versions.node.
Trying to install instead of use version 12.