View Single Post
Old 04-22-2009, 08:27 PM   #8 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by Kalle View Post
javascript Code:
/* I'm really lazy so I'll use eval here, don't do like this! */
eval('++retval.' + elements[n].type.toLowerCase() + ';');
javascript Code:
/* Don't be lazy! */
++retval[elements[n].type.toLowerCase()];
Salathe is offline  
Reply With Quote
The Following User Says Thank You to Salathe For This Useful Post:
Kalle (04-22-2009)