I downloaded and installed node.js
on Windows and I'm following a simple tutorial from nodebeginner.org.
I've created a file called HelloWorld.js
which contains just:
console.log("Hello World");
When I type node HelloWorld.js
in the node.js
console I get:
SyntaxError: Unexpected identifier
I checked my classpath variable and it has the C:\Program Files\nodejs\
on it.
HelloWorld.js
is still open in Notepad++
for editing.
What am I doing wrong?
console.log("Hello World");
at the moment, nothing else. The file sits in the Desktop directory. This is what's in the console at the moment:> node HelloWorld.js node HelloWorld.js ^^^^^^^^^^ SyntaxError: Unexpected identifier >