"with" scope and properties with square bracket notation
- by Anurag
Is it possible to access object properties that can only be accessed with the square bracket notation when inside a "with" statement.
Example:
var o = { "bad:property": 1, "goodProperty": 2 };
with(o) {
console.log(goodProperty); // works awesome
console.log(???) // how to access "bad:property"?
}