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
Should I disable javascript?
Name the types of functions.
How to detect the operating system on the client machine?
What is external javascript?
What does dynamic component in javascript contain?
What e means?
What is null variable?
Write JavaScript code to use file system in binary format?
What are escape characters?
Which built-in method returns the character at the specified index?
What is an external javascript?
what is a difference of subclass and main class