as the title says i'm trying to sum up using a for loop to iterate over an array. can you give me some pointers as to where i'm going wrong here. i am returning the value NaN.
var total = 0;
function sum(input) {
for (idx=0; idx<=input; idx++) {
total += input[idx];
}
return total;
}
idx < inputin yourforloop