XML Feeds

.

[javascript-dev] Re: js question from a newbie

mdk mdk at relivethefuture.com
Thu Mar 27 01:07:39 MDT 2008


im pretty sure array.reverse() doesnt return the array (or a copy), it just reverses it in place.

try

myarray.reverse();
post(myarray);

also i noticed that your loop checks for > 0, and arrays start from 0, maybe you want >= 0 ?

i would usually count upwards from zero

for(i = 0;i<k;i++)
{
  myarray[i] = i;
}


More information about the javascript-dev mailing list