The following code creates a hypertext link that submits a form when the user clicks it. The precedence of operators determines the order they are applied when evaluating an expression. You can override operator precedence by using parentheses. Table 9.7 describes the precedence of operators, from lowest to highest. Regular Expressions JavaScript 1.2, available in Navigator 4.0, adds regular expressions to the language.
Regular expressions are patterns used to match character combinations in strings.
In JavaScript, regular expressions are also objects. For example, to search for all occurrences of 'the' in a string, you create a pattern consisting of 'the' and use the pattern to search for its match in a string. These patterns are used with the exec and test methods of regular expressions, and with the match , replace , search , and split methods of String . Object initializers provide compilation of the regular expression when the script is evaluated. When the regular expression will remain constant use this for better performance.