An ECMAScript program consists of lines of ECMAScript code separated by either a new line or a semicolon. Each line represents a declaration, an assignment, a control-flow statement, or a function call. Each of these lines typically contains, amongst other things, expressions - ECMAScript “phrases” that can be evaluated.
As in most languages, there is a set of reserved words that define atomic language operations and language features. The ECMAScript reserved words are shown in Table A-1.
abstract | else | int | super |
boolean | extends | interface | switch |
break | false | labeled | syncronized |
byte | final | long | this |
case | finally | native | throw |
catch | float | new | throws |
char | for | null | transient |
class | function | package | true |
const | goto | private | try |
continue | if | protected | typeof |
default | implements | public | var |
delete | import | return | void |
do | in | short | while |
double | instanceof | static | with |
Both VoiceXML and HTML enclose ECMAScript code within the script element. When encountered by a renderer such as a browser or a VoiceXML interpreter, all ECMAScript lines existing outside of functions are executed in order. This code can reference ECMAScript functions declared within the same script element or within other script elements sharing a common namespace.
VoiceXML provides a hierarchy of namespaces: Session (read-only), Application, Document, Dialog, and Anonymous, as described in 2.4, “VoiceXML variable support. Variables declared in a parent namespace are visible to those in the child namespaces, but not vice versa.
3.145.109.8