Complete the code to check the installed Node.js version.
console.log(process.[1]);process.version which returns a string but not the exact Node.js version property.process.nodeVersion.The correct way to get the Node.js version is process.versions.node. It returns the version string.
Complete the command to install Node.js version 18 using nvm (Node Version Manager).
nvm [1] 18
nvm use 18 before installing the version.nvm setup 18 which is not a valid command.The nvm install 18 command downloads and installs Node.js version 18.
Fix the error in the command to switch to Node.js version 16 using nvm.
nvm [1] 16
nvm switch 16 which is not recognized by nvm.nvm select 16 which is invalid.The correct command to switch to an installed Node.js version is nvm use 16.
Fill both blanks to list all installed Node.js versions and set the default version to 14.
nvm [1] nvm alias default [2]
nvm use instead of nvm list to show versions.nvm list shows installed versions. nvm alias default 14 sets version 14 as default.
Fill all three blanks to create a script that prints the current Node.js version and switches to version 12.
console.log(process.[1]); nvm [2] [3]
process.version instead of process.versions.node.The script logs the Node.js version using process.versions.node. Then nvm use 12 switches to version 12.