WithStatement : with ( Expression ) Statement
- Let val be the result of evaluating Expression.
- Let obj be ToObject(GetValue(val)).
- ReturnIfAbrupt(obj).
- Let oldEnv be the running execution context’s LexicalEnvironment.
- Let newEnv be NewObjectEnvironment(obj, oldEnv).
- Set the withEnvironment flag of newEnv’s environment record to true.
- Set the running execution context’s LexicalEnvironment to newEnv.
- Let C be the result of evaluating Statement.
- Set the running execution context’s Lexical Environment to oldEnv.
- Return C.