Scope of Script PropertiesLike the scope of a variable, the scope of a script property determines where else in a script you may refer to the same property ID. The scope of a property in turn depends on where you declare it.
You can declare a property at the top level of a script or at the top level of a script object. If you declare it at the top level of a script, a property identifier is visible throughout the script. If you declare it at the top level of a script object, a property identifier is visible only within that script object. After declaring a property, you can use the same identifier as a separate variable only if you first declare it as a local variable.
For detailed information and examples of the use of properties in subroutines, see "Scope of Script Variables and Properties," which begins on page 252.