node> const foo = "bar"; var foo = "baz"
TypeError: var 'foo' has already been declared
at repl:1:1
at Interface.<anonymous> (repl:74:19)
at Interface.emit (events:25:26)
at Interface._ttyWrite (readline:178:12)
at Interface.write (readline:119:27)
at Stream.<anonymous> (repl:55:9)
at Stream.emit (events:25:26)
at IOWatcher.callback (net:510:16)
at node.js:221:9
If you're running it across multiple commands, then the const-ness
gets lost because each line of repl script is being run in a sandboxed
global.
For the key bindings, I highly recommend using rlwrap instead of
node's readline.js, if you want fancy features.
alias js='NODE_NO_READLINE=1 rlwrap node'
And then you can put whatever you want in your ~/.inputrc
--i
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>