Typeof

From triplescripts.org wiki
Revision as of 19:42, 22 June 2020 by Colby Russell (talk | contribs) (grammar)

The triple script dialect includes typeof expressions.

Unlike ECMA-262, when using 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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.