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

Is array an object javascript?

0 Answers  


How can a particular frame be targeted, from a hyperlink, in javascript?

0 Answers  


Does html5 replace javascript?

0 Answers  


What is the difference of "settimeout" function and setinterval functions in javascript

0 Answers  


why you used Java Script? Can it use for both client side and server side validation purpose?

12 Answers   BeBo Technologies, HCL, Wipro,


What is scope variable in javascript?

0 Answers  


How and where javascript namespacing is used?

0 Answers  


What does clean white space mean?

0 Answers  


What is the most widely used programming language?

0 Answers  


How many functions are there in javascript?

0 Answers  


What does => mean in node js?

0 Answers  


Is javascript multi-threaded or single-threaded?

0 Answers  


Categories