Fiddle with output

Template for writing a fiddle which can display a result, rather than having to output it to the console.

HTML

<pre id="output"></pre>

JavaScript

function out()
{
    var args = Array.prototype.slice.call(arguments, 0);
    document.getElementById('output').innerHTML += args.join(" ") + "\n";
}

var a = new Array(new Array(new Array()));
out('a length:', a.length);
out('a[0] length:', a[0].length);
out('a[0][0] length:', a[0][0].length);