View Single Post
Old 12-12-2012, 07:56 PM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,553
Thanks: 9
Thanked 480 Times in 463 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
Code:
for(var i=0; i<myArray.length; i++) { 
myArray[i] = parseInt(myArray[i], 10);
}
can be written without a loop as:

Code:
myArray=myArray.map(Math.floor);
if your table is shaped like a ladder, it can't be recursively iterated.
recursion is for deeply nested objects, like a folder structure.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:15.2% IE7:0.5% IE8:8.4% IE9:8.5% IE10:8.5%
rnd me is offline   Reply With Quote