In this lesson we will use npx to run a package using different versions of Node.js. This can become valuable when testing the various new features that are introduced in versions of Node.js.
[00:38] Let's run npx -p email@example.com, and tell it to execute our index.js file. Now, Node version 8.2.1 did not yet have support for object spread. It makes sense why we would get an unexpected token error at the ...A location.
[00:55] However, we could try that command again, but this time, we'll update the Node version to 8.3.0which is when object spread was added. Sure, indeed, it works as expected. This particular trick could come in handy if you need to try out code with various versions of Node.