How to write multiple lines of code in Node REPL

后端 未结 5 2163
一个人的身影
一个人的身影 2020-12-23 19:35

I would like to evaluate

var foo = \"foo\";
console.log(foo);

as a block, instead of evaluating line by line

var foo = \"f         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 19:48

    Maybe I didn't understand the question well, but if you want to write multiline command in the console of the repl, you can use shift+enter to move to the next lines.

提交回复
热议问题