For Ruby, we have irb. For Python, we have IDLE. For Javascript, is Firebug or Chrome on a blank page the best way to run or test Javascript interactively?
-
Possible duplicate of http://stackoverflow.com/questions/822071/interactive-javascript-console-preferably-integrated-with-firebug – Vivin Paliath Jul 01 '10 at 23:21
4 Answers
You can also visit JSBin or JSFiddle.
On the iPhone, there is JSanywhere (it seems written by a Japanese author).
There is not much information about it on Google in English, but it can be downloaded for free from the App Store.

- 479,566
- 201
- 878
- 984
-
JSBin and JSFiddle are really nice too. JSConsole might be closer to an interactive console like irb or IDLE. – nonopolarity Jul 03 '10 at 14:07
-
JSBin worked for me to run just JS code without HTML, but JSFiddle didn't – knocte Sep 16 '15 at 13:25
In addition to the alternatives already mentioned by @alex:
On the browser:
Both with basic auto-completion.
Standalone consoles:

- 1
- 1

- 807,428
- 183
- 922
- 838
-
JSConsole is really good because it can show the whole object's content, like Ruby's inspect() or what is shown in irb – nonopolarity Jul 03 '10 at 14:06
-
You could also use `node-repl` or Apple's `jsc`, if you're on a Mac. I have a little bit more on my blog: http://www.bubblefoundry.com/blog/2009/09/javascript-console/ – pr1001 Nov 10 '10 at 10:51
As of 2013, there is a good comparison of the available options here:
http://www.sitepoint.com/7-code-playgrounds/
Also interesting:
http://css-tricks.com/forums/topic/codepen-jsfiddle-jsbin/#post-134290
Tldr;
- Codepen may be the "best-looking feature-packed playground". Seems to be under constant development; strong on social features.
- JSBin appears to be the only option offering a real interactive console.
- Details matter; the discussion in the CSS Tricks forum (see above) is particularly helpful in that regard.

- 7,029
- 1
- 45
- 41
The 'shell' and 'jsenv' bookmarklets from squarefree work well:
https://www.squarefree.com/bookmarklets/webdevel.html
I prefer to use a bookmarklet so I can work in the environment of the current page.
Firebug addicts can use Firebug Light in other browsers: http://getfirebug.com/firebuglite
However nothing beats the modern browser built-in debuggers for:
- error messages from timeouts
- line numbers of errors
- addings breakpoints
- live scope inspection

- 29,306
- 13
- 121
- 110