How to tell if node.js is installed or not

I've done a bit of searching, to find the usual, not much, I can't find the "Node.js for dumbies" guide anywhere too.(teehee)

So anyways, down to business.

I've recently install node.js to start making some applications, first encountered problem: no idea how to run applications. All I did was install node.js but couldn't find further instructions. What does one really need to do? I wanted to see if it was actually working. So I executed a script called hello.js it went as such:

console.log('hello world');

Now where would this be logged to?

Edit

I'm running this .js through a .php script.

open a terminal window. type:

node -v

this will display your version

navigate to where you saved your script

node script.js

this will run it.

I got the same error as you and below solution worked for me,

sudo apt-get install nodejs

nodejs script.js