If you want to test some javascript then use jsbin.com.
This website allows you to script HTML, CSS, javascript with many libs.
These libs include JQuery, Bootstrap, Angular, Dojo, Enyo, CoffeeScript and more…
After you edit your script just press button Run with JS.
See the next image where I test if WebGL is supported by my browser.