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
what is the need of javascript in the internet
I am providing the Online& class room training on Worksoft Certify for SAP/HTML/JAVA using real time scenarios in a real time environment for a real time project, If any one is interested please get in touch with me on aimansaud@gmail.com
What are the advantages of using JavaScript?
List some features of javascript.
Can you access Cookie using javascript?
How can a page be forced to load another page in javascript?
What is difference between var x =1; and x=1;?
How do I open javascript console?
How many data types are there in javascript?
Is javascript object oriented?
What is the difference between call & apply?
In which location cookies are stored on the hard disk?