Arrays in JavaScript are one dimensional.
So arrayi[0] is undefined, then arrayi[0][0] becomes undefined[0] which obviously doesn't work.
You need to create a two dimensional array by assigning arrays to the indexes of arrayi, there's also an error with the actual value that's being assigned:
var arrayi = []; // [] is the favored shorthand of new Array()
for (var i=0; i<=9; i++) { // always place { on the same line,
// automatic semi colon insertion can screw you up in JavaScript
arrayi[i] = []; // assign a new empty array
for (var o=0; o<=9; o++) {
arrayi[i][o]= i + '' + o; // i and o are both numbers so you will assign their sum
// need to convert them to strings in order to concatenate them
}
}
Concerning automatic semicolon insertion screwing you up, take a look at this:
return // js will insert a semi colon here, so this will return undefined
{ // no syntax errors, gets parsed as a block, even though there is block scope in JS
foo: 2 // parsed as a label... single expression evaluation then makes the 2 work
} // another semi colon gets inserted here
So JS is fixing your code... the wrong way :)
Update
It's a bit unclear to me what you exactly want to do, if you want to split a number into it's to decimal places and then assign that, than you will first have to make sure that your arrays are big enough and then you have to split the number:
var i = 62;
var s = (i).toString(); // convert the number 62 to a string
s = i < 10 ? '0' + i : s; // make sure that "9" will become "09"
var p = s.split(''); // ["6", "2"];
arrayi[+p[0]][+p[1]] = i; // assign the value, + will convert the strings to a number without the horrible parseInt
parseInt(i) + parseInt(o)document.write()is pretty evil and generally deprecated. Perhaps it's only here as sample code.