It is very cool when you want to recursively access an object.
see d'code
var obj = {foo: 'foo', bar: 'bar'};
with(obj){
foo = 'new foo';
bar = 'new bar';
}
or
var obj = {foo: 'foo', bar: 'bar'};
with(
obj,
{
foo: "new foo",
bar: "new bar"
}
);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment