update npm and node code example
Example 1: update npm
npm install -g npm@latest
Example 2: upgrade npm
npm i -g npm-upgrade
Example 3: update node js version ubuntu
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Example 4: update npm
npm install -g npm@latest
// for global install
Example 5: npm latest version windows
npm-windows-upgrade --npm-path "C:\nodejs"