I am on OSX and installed node from the website.

When I tried running basic
console.log('Hello World')
it's giving me following error.
-bash: syntax error near unexpected token `'Hello world''
Please let me know how do I proceed.

I tried re-installing node from https://github.com/joyent/node/wiki/installation and if I try to check version of node or npm, I can see them.