Javascript REPL from the command line

Whenever I code, I often end up in the REPL to test some concepts before going ahead and implementing it. For development of Ruby on Rails I use PRY , and for python I use bpython . Want to know if there is an equivalent for javascript. Mostly testing javascript code from terminal

+4
source share
3 answers

Although I usually have a browser with JavaScript enabled, I often find that I'm using Node.js REPL.

Just run node on the command line and it will open REPL for you.

+8
source

You just need to use node.js:

 $ node > 1 + 1 > 2 > 

Although this will not work for a regular browser element ( window , document ) and DOM. If you need a browser environment, check out the Phantomjs REPL and Casperjs - although I'm not sure about their capabilities.

+3
source

Node.js offers REPL, although you probably don't want to be part of Node as a whole.

0
source

Source: https://habr.com/ru/post/1484286/


All Articles