InterviewSolution
| 1. |
What Is The 'with' Keyword? |
|
Answer» The ‘with’ keyword is used as a kind of shorthand for REFERENCING an OBJECT's properties or methods. The object specified as an argument to with becomes the default object for the duration of the BLOCK that FOLLOWS. The properties and methods for the object can be used without naming the object. Syntax: The syntax for with object is as follows -- with (object){ The ‘with’ keyword is used as a kind of shorthand for referencing an object's properties or methods. The object specified as an argument to with becomes the default object for the duration of the block that follows. The properties and methods for the object can be used without naming the object. Syntax: The syntax for with object is as follows -- with (object){ |
|