The JavaScript Testbed is a simple webpage that illustrates the power of the JavaScript Function object type. Simply enter JavaScript code into the Code textbox and click the Run button to see the result. The entire testbed is written in JavaScript and is only 19 lines of code!
The following special commands are defined in the testbed:
print(x);println(x);print(x + "<br>");attach(x);var div = document.createElement("div");
div.style.fontFamily = "arial";
div.style.fontWeight = "bold";
var txt = document.createTextNode("Hi there!");
div.appendChild(txt);
attach(div);
Running the above code results in this in the Results section: