1. with a new function (**update** on 2012/09, I think it needs to be a function invocation, not just a function definition)
2. in a "with" statement
as a note, any new block (in if-then-else, loops, or just beginning a block for no other reason) won't create a new scope.
Is there a third situation where a new scope is created besides the two situations above? Thanks.
EcmaScript 5 strict mode no longer supports the with statement.