views:

684

answers:

8

I am looking for recommendations for a browser based javascript sandbox to practice some proof of concept code.

+3  A: 

Whenever I've had to test some browser based javascript, I find the simplest solution is the best: create a simple HTML page that calls my javascript and load it in IE (or Firefox, or whatever).

Matt Jordan
+3  A: 

jsbin is pretty good, especially if you're trying to show some code to other people. Its major downside IMO is that because it runs your code in an iframe (i think), calls to console.log don't appear anywhere.

nickf
I had trouble getting jsbin to work at all, but that was on the unstable chrome release.
EndangeredMassa
+25  A: 
Kevin
I highly recommend firebug. A great tool for any web developer.
Jim Petkus
While you're at it, get FireUnit for Firebug.
Alan
+1  A: 

http://eloquentjavascript.net/

This is a tutorial, but each page of the tutorial has a browser based interactive "command line" in which to practice the examples. And each of the code samples has a button to automaticaly push the code into the interactive evaluator.

Breton
+6  A: 

It's not very well known, but the web development tools in the latest nightly builds of Webkit are incredible, exceeding Firebug even in terms of usefulness and speed.

Builds for Mac and Windows can be downloaded from http://nightly.webkit.org/

Once you've got it loaded, go to Develop -> Show Web Inspector

From there you can debug scripts on the current page, explore the DOM, and get access to a truly kick ass javascript console, with term completion and a great UI for examining objects.

Peter Burns
I've always found Firebug to be superior. For example, if you do something like console.log(myObject) then it will print out the object as a link which shows you all its methods and attributes. Chrome just gives a string representation. Please correct me if I'm wrong...
nickf
I'm not sure what Chrome does, but the webkit nightly behaves like Firebug: http://img516.imageshack.us/img516/6121/picture1yt7.png
Peter Burns
+2  A: 

I'm very fond of the JavaScript Shell, a lightweight bookmarklet that opens up a Firefox window that has full access to the current page's DOM.

Firebug is great, of course, but sometimes I need something a little more single-purpose.

yalestar
A: 

I also found this page -- any feedback on it?

http://www.headfirstlabs.com/books/hfjs/hfjs_handson.php

Noah
A: 

For online sandboxes for several different languages, platforms, and open source applications, see this similar SO question.

flamingLogos