JS.10.7 The 'with' Statement

A 'with' statement establishes an object as the default object for a set of statements.

with(object) {

  statements;

}

The properties and methods of the object can be referenced without qualifying the names with the object name.

with(Text1) {

  text = "contents of this text element";

}

<< JS.10.6 The 'switch' Statement © 1996-2013 InetSoft Technology Corporation (v11.4) JS.11 JavaScript Name/Value Pairs >>