Nabuat Al Jahid Nabuat Al Jahid - 1 year ago 73
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")

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download