Looking for a shell for Javascript coding / experimenting using the command line

Is there a shell for Javascript coding / experimenting using a command line offering history, completion, help, debugging, etc.? I found iPython very useful for quickly writing scripts in Python.

I looked at various shells such as node , Rhino , JSDB , but their functionality on the command line is somewhat limited.

+3
source share
2 answers

The Firebug console does exactly what you want, just like the Chrome developer tools (accessible by pressing F12 or by navigating the menu).

+3
source

I am using kobyk REPL on cscript.exe.

In addition, I use emacs, and there is an elisp module that allows you to place this REPL in emacs called jsshell . This means that you can do cut / paste, search / replace, edit command line, etc. - All text manipulations available for emacs buffers are available in the Javascript interactive shell.

Welcome to the JScript shell.
Running JScript Version 5.8.16982
'exit' to exit.

js> 
loading c:\dev\js\json2.js
js> 

loading c:\dev\js\stringExtensions.js
js> 

loading c:\dev\js\moment.js
js> 

loading c:\dev\js\arrayExtensions.js
js> 
Multi-line input. Use two consecutive blank lines to eval.

var id = "11111;22222;33333"; 

id = id.split(";"); 

js> function say (x) {WScript.echo(x);}
js> for (var i in id) { say (i); } 
0
1
2
forEach
every
map
filter
remove
removeAt
indexOf
contains
js> for(var i=0;i<id.length;i++) { say (i + ": " + id[i]); } 
0: 11111
1: 22222
2: 33333
js> 
0
source

All Articles