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 argument objects in javascript & how to get the type of arguments passed to a function?

0 Answers  


What is node value?

0 Answers  


What are the variable naming conventions in javascript?

0 Answers  


How to reload a page using JavaScript?

0 Answers  


What would you use javascript for?

0 Answers  


Explain window.onload and ondocumentready?

0 Answers  


How do I turn off javascript in chrome?

0 Answers  


how to use java script

1 Answers   Infosys,


Why are callbacks used?

0 Answers  


How can javascript codes be hidden from old browsers that don't support javascript?

0 Answers  


What is a “closure” in JavaScript? Provide an example

1 Answers  


What is the difference between synchronous and asynchronous JavaScrip

1 Answers  


Categories