Like others, the accepted answer also gave me an outdated version.
Here is another way to do it that works very well:
$ curl --silent --location https://rpm.nodesource.com/setup_14.x | bash -
$ yum -y install nodejs
You can also replace the 14.x with another version, such as 12.x, 10.x, etc.
You can see all available versions on the NodeSource Github page, and pull from there as well if desired.
Note: you may need to run using sudo
depending on your environment.