There's more...

If we have also installed version v9.6.1, we would use the following command to set it as the default:

    nvm use 9.6.1

Now when we open a new shell, v8.6.0 will be the Node.js version in use. Unlike the macOS and Linux versions, the last version selected is maintained through shell sessions, and a default doesn't need to be set.

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.