Installed Node.js and Sublime Text But Keep Getting Errors -
i'm beginner @ trying learn web development. downloaded node nodejs.org website , downloaded sublime text 3 website well.
my code sublime follows:
$ node console.log("who's you're daddy?");
when try run on node.js error says:
"syntax error, unexpected identifier."
this literally step 1 , i'm messing up. how have set wrong?
from trying seems want print "some string" in console using nodejs.
in nodejs can create javascript logic first , can execute logic using node.
- create file somefile.js
write following code in file:
console.log('who's daddy?');
in terminal , execute:
node /location/of/the/file/somefile.js
it should print 'who's daddy?' in console.
to learn more nodejs , started can refer how started node.js
Comments
Post a Comment