This includes the assignment operators, arithmetic operators, logical operations, string manipulation and comparison operators. Arrays are not directly supported, but the string functions support indexing. Two operators, typeof and isvalid are used for type checking. Functions are declared with a name, the parameters that the function accepts, and a block statement that contains the code. Parameters are passed by value and are treated as local variables.
All functions always return a value, and the default value is an empty string.
Function declarations cannot be nested. Local functions, that is, functions within the same compilation unit, are referenced directly by name, whereas external functions are called using a URL and fragment anchor. Standard library functions are called using the library name and function name separated by a period. The code snippet in the next section contains an example of calling a standard function in this way. Conditional branching is limited to if and if else statements.