SV: [Opera-users] Java Script
Rolf Strömgren
rolf.stromgren at switch.se
Wed Jun 27 10:11:00 UTC 2001
-----Ursprungligt meddelande-----
Från: Silviu Cojocaru [mailto:silviucj at yahoo.com]
Skickat: Tuesday, June 26, 2001 4:42 PM
Till: opera-users at opera.com
Ämne: Re: [Opera-users] Java Script
<!-- Begin
function makearray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = 0;
return this;
}
--- You make an array of length n, (indexed 0 to n-1),
and then you initialize it to 0 iterating from 1
to (including) n, instead of iterating from 0 to n-1.
This should give you some problems, if I remember my
javascript lessons correctly. (The client should experience
an "arrayoutofbounds".)
As for the rest of the code - sorry, I would have to
go back to training for that... :)
regards,
Rolf Strömgren
Test Leader
Switch Technologies Sweden AB
Vasagatan 40, 111 20 Stockholm
Phone: +46 8 522 21 000
Direct: +46 8 522 21 061
rolf.stromgren at switch.se, www.switch.se
More information about the Opera-users
mailing list