2
Vote

Variable name collision in for..in loops

description

in a for..in loop, if the variable name is one character, the variable name is not picked up and the same name can be use to minify other functions or variables.

Example:

for(var o in myObjects){
helper(o.name);
}
var helper=function(){...}

can be minified to this:

for(var o in t){
o(o.name);
}
var o=function(){...}

comments

TimCoulter wrote Jan 21, 2015 at 12:50 PM

I am also experiencing this issue and have posted code to reproduce the problem here: