In python, you can do this:
[([None] * 9) for x in range(9)]
and you\'ll get this:
[[None, None, None, None, None, None, No
You can add functionality to an Array by extending its prototype object.
prototype
Array.prototype.nullify = function( n ) { n = n >>> 0; for( var i = 0; i < n; ++i ) { this[ i ] = null; } return this; };
Then:
var arr = [].nullify(9);
or:
var arr = [].nullify(9).map(function() { return [].nullify(9); });