Math.pow not accepting my array values
Wierd...
Code:
narray = [[.55], [.6], [.7], [.9], [1.125], [1.4], [1.75], [1.875], [5.5]];
Nsum = 0;
for (n=0; n<=narray.length-1; n++) {
narrayn = narray[n];
Nsum += Math.pow(narrayn, -1);
}
Narrayn returns Valid, while Nsum returns NaN.
WhY? i fiddled wit this for a straight hour and i'm ripping my hair out over wut the heck i did wrong.
EDIT: really all i'm trying to do is take the reciprocal of my array variables, which i then put through a script (tested and worked) which avgs them, and then performs a function on them. Its to test whether a series of speeds at set intervals will end me up at the same place.