Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Post New Answer

More JavaScript Interview Questions

what is onfocus and onblur events in java script?

2 Answers  


What is the role of a strict mode in javascript?

0 Answers  


Explain typecasting in javascript?

0 Answers  


What are the Advantages and Disadvantages of JavaScript?

0 Answers  


Write a way by which you can do something on the close of the window ?

0 Answers  


Can you explain the difference between == and ===?

0 Answers  


Write a Program using Servlet and JDBC for developing online application for displaying the details of Cars owned by the residents in XYZ society. Make necessary assumptions and create appropriate databases

0 Answers   Ignou,


Event bubbling and Event Capturing in JavScript?

0 Answers  


Is javascript whitespace sensitive?

0 Answers  


What's relationship between JavaScript and ECMAScript? And What are JavaScript types?

0 Answers   MCN Solutions,


What is the difference between push() and concat() in javascript?

0 Answers  


Is everything in javascript asynchronous?

0 Answers  


Categories