简体   繁体   中英

Issues with Node.js REPL

I am having problems with node.js REPL. I put in the following line into the node REPL:

var p = {fname: "john", lname= "Doe"}

What I get back is an ellipsis (...) as if REPL is waiting for a continuation. I also try to put a ; at the end, or taking the var keyword out, but get the same result.

Why does it think that it is not the end of a statement? What am I missing?

env: Node version 0.6.2, running on windows.

Thanks.

Your syntax is wrong, it should be:

var p = {fname: "john", lname: "Doe"}

(note the : instead of = )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM