Basic functional examples
by hotbelgo
HTML
I would also like to be able to see the various .length measures in the results section rather than in the console log but I'm not used to fiddle, and document.write is blocked
JavaScript
var a = new Array(5);
for (i = 0; i < a.length; i++) {
a[i] = new Array(6);
}
var n = _.map(a, function (row, rowIdx) {
return _.map(row, function(col, colIdx) {
return rowIdx * colIdx
});
});
console.log(a.length)
console.log(n.length)
console.log(a[0].length);
console.log(n[0].length);