This is the old way of defining arrays and only way allowed in Netscape 2. |
You were asked to define a special function |
function MakeArray(size) { |
this.length = size; |
for( var i=1; i<=size; i++ ) { |
this[i]= 0; } |
} |
This gives arrays where you must predefine a size (a problem) and where arrays count from 1 not 0 (an artifact of MakeArray setting this.length = size at start not end of function. The latter feature could lead to great joy for Fortran programmers! |