Typeof

From triplescripts.org wiki
Revision as of 19:42, 22 June 2020 by Colby Russell (talk | contribs) (Created page with "The triple script dialect includes <code>typeof</code> expressions. Unlike ECMA-262, <code>typeof</code> the righthand side must be parenthesized. E.g. <code>typ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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