
org.sonar.l10n.javascript.rules.javascript.WithStatement.html Maven / Gradle / Ivy
The object of the with can have properties that collide with local variables, it can drastically change the meaning of your program :
with (foo) {
var x = 3;
return x;
}
The local variable x could be clobbered by a property of foo and perhaps it even has a setter, in which case assigning 3 could cause lots of other code to execute.
Never use the with statement.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy