command to update npm to latest version code example
Example 1: update npm
// update npm//
npm install -g npm@latest
Example 2: update npm
npm config get prefix -g
// update npm//
npm install -g npm@latest
npm config get prefix -g