Do you know not to use the "eval" function?
Most of people that use "eval" want part of a variable name to be variable.
Once you realize that all global variables are held in the window array it becomes rather obvious that you can refer to that same field name without needing to use "eval" by referring to it.
eval('somevar' + num)
Figure: Bad example - The developer creates the variable name by concatenating the constant and variable parts together
window['somevar' + num]
Figure: Good example - Referencing the same field is as simple to code and more efficient than using "eval"