Do you know not to use the "eval" function?
24/08/2015 11:08 AM by
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.
Figure: Bad example - The developer creates the variable name by concatenating the constant and variable parts together
Figure: Good example - Referencing the same field is as simple to code and more efficient than using "eval"
Do you feel this rule needs an update?