Nabuat Al Jahid Nabuat Al Jahid - 11 months ago 53
Node.js Question

node js (-bash: syntax error near unexpected token `"Hello World"')

I just started to learn node.js and I use macbook pro. In its terminal when I write any node.js command like console.log("Hello World"); its shows -bash: syntax error near unexpected token `"Hello World"'. How can I solve this?

Answer Source

Type node then press Enter and THEN type console.log("Hello World")