4

Is there a shell for Javascript coding/experimenting using command line offering history, completion, help, debug, etc.? I found iPython very useful for quick Python scripting.

I looked at various shells like node, Rhino, JSDB, but their command line functionality seem to be somewhat limited.

2 Answers 2

3

The Firebug console does exactly what you want, as does the Chrome Developer Tools (accessible by pressing F12 or by navigating through the menu).

Sign up to request clarification or add additional context in comments.

1 Comment

There is also an experimental "terminal" plugin at: paulrouget.com/e/jsterm
0

I use kobyk's REPL on cscript.exe.

Also, I use emacs, and there is an elisp module that allows hosting of that REPL in emacs, called jsshell. This means you can do cut/paste, search/replace, command-line editing, and so on - all the text manipulation made available to emacs buffers is available in the interactive Javascript 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> 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.