What is missing in my code?
function numberTally(numList) {
var evenTotal = 0;
var oddTotal = 0;
for (var i = 0; i <= numList.length; i++) {
if i % 2 { // i is odd
oddTotal += numList[i];
// or oddTotal = oddTotal +
numList[i];
}
else { // i is even
evenTotal + numList[i];
}
}
alert(oddTotal);
return evenTotal;
}
No Answer is Posted For this Question
Be the First to Post Answer
Give an example of closure?
What is isnan in javascript?
What is the difference between HTMLCollection and NodeList?
write a program using javascript/ vbscript that checks if two matrices have identical values in all the elements.
When do we use JSON.stringify()?
What is javascript namespacing?
What is differential inheritance?
What is this? Var myarray = [[[]]];
How to hide javascript code from old browsers that dont run it?
how can i change colour of a image in aspx file?
How much do javascript programmers make?
Is javascript server side or client side?