form link:http://javascript.about.com/od/hintsandtips/a/worst_5.htm <5>eval
eval
The fifth worst Javascript coding used by Javascript novices is to use the eval() method to evaluate variable names. The eval method is just about the least efficient statement that you can use in Javascript and most of the time its use in completely unnecessary.
The most common usage that people make is something along the lines of eval('myVar' + i)
form link:http://javascript.about.com/od/hintsandtips/a/worst_5.htm <5>eval
eval
The fifth worst Javascript coding used by Javascript novices is to use the eval() method to evaluate variable names. The eval method is just about the least efficient statement that you can use in Javascript and most of the time its use in completely unnecessary.
The most common usage that people make is something along the lines of eval('myVar' + i)