Obfuscate javascript properties?
问题 I've recently tested UglifyJS and YUI Compressor and noticed something odd. Both minifiers don't seem to change the names of object properties, only the names of variables and functions. for instance if I have the following code: var objName = {first:2, second:4}; alert(objName.first + " " + objName.second); the names first and second remain unchanged in the minified version. Why is that? 回答1: It's because it doesn't know where the object is going to be used. It could be used externally by