, , , (.)
// BAD use of with is to replace this:
// some.expression.with.lots.of.dots.x = 10;
// some.expression.with.lots.of.dots.y = 20;
// with this:
with (some.expression.with.lots.of.dots) {
x = 10;
y = 20;
}
, :
var functions = [];
for (var i = 0; i < 5; i++) {
with ({ j: i }) {
functions[i] = function() { return j; };
}
}
, , , , .