You are viewing a single comment's thread. Return to all comments →
function simpleArraySum(ar) { let sum=0; console.log(ar.length); for(let i=0 ;i< ar.length; i++){ sum=sum + ar[i]; } return sum;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Array Sum
You are viewing a single comment's thread. Return to all comments →
function simpleArraySum(ar) { let sum=0; console.log(ar.length); for(let i=0 ;i< ar.length; i++){ sum=sum + ar[i]; } return sum;
}