-- advertisement --

Before installing Node.js, just check if it is already installed in your machine. You can check by using node –version command. This will give you the current version of Node.js.
If it is not installed already, then you can use brew to easily install ant. Simply execute the following command in a terminal window to install brew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

It may take a while to download and install. If you already have brew installed, make sure to update it by executing below command

brew update

Once brew is installed you can use below command to install Node.js

brew update
brew upgrade node
brew install node

Node should will be installed. Check if installed successfully

node --version