node.js SyntaxError: Invalid or unexpected token

后端 未结 2 1846
囚心锁ツ
囚心锁ツ 2021-01-19 22:13

I have downloaded and installed node.js from https://nodejs.org/en/. I want to run a js file:

console.log(\'hello\');

I run nod

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-19 22:43

    Did you copy some unicode characters from word or something?

    try retyping the console.log('hello') Something like this has happened to me before, when I copied some code from a word document.

提交回复
热议问题