2

So, in the node REPL, if I do something stupid, I get stuck in ... hell. I suppose the interpreter is waiting for the statement to be closed, but how can I break out of this?

$ node
> "I did something stupid
...
...
asking
  • 1,435
  • 3
  • 13
  • 21
  • 2
    possible duplicate of [Node.js REPL continuation lines](http://stackoverflow.com/questions/6734712/node-js-repl-continuation-lines) – hexacyanide Jun 14 '14 at 19:23

2 Answers2

4

I usually do Ctrl-C and that works fine atleast in Linux .

Ctrl-C and Escape are the most common "break from something" keys .

It works in most of the terminal apps .

As a bonus , in linux I use Ctrl-L to clear Node.js, Python etc REPL .

It is helpful sometimes .

Nishant
  • 20,354
  • 18
  • 69
  • 101
0

You can type in .exit to exit the node.js REPL

Sandeep
  • 9
  • 5