Testing that Node.js is installed properly

Now that Node has been installed on your system, let's run a quick test to ensure everything is working properly.

Access a command line via your terminal program and execute the following command:

    $ node --version
    v8.4.3
    $ npm --version
    5.3.0

Assuming that your Node installation was successful, you should see the version number that was installed as an output on the screen, right under the command you executed.

Your version numbers will most likely be more recent than those printed earlier.

You can also launch the Node repl, a command-line shell that lets you execute JavaScript directly:

    $ node
    > console.log('Hello world!')
    Hello World!
    Undefined
    [press Ctrl-C twice to exit]  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.189.67