The triple script dialect includes typeof
expressions.
Unlike ECMA-262, typeof
the righthand side must be parenthesized. E.g. typeof foo
is an error, but typeof(foo)
is not.
NB: The result of a typeof
expression is a string, and there is no need to use triple equals when checking the result. In fact, it is an error to check a typeof
expression with triple equals.