Nabuat Al Jahid Nabuat Al Jahid - 15 days ago 5
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

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

Comments