Mascara: Next Generation JavaScript compiler

Try it Download Buy About Documentation Blog Contact

New Syntax

Apart from the new keywords, there is some new syntactic construct in Mascara JavaScript.

Colon - the colon is used for type annotations, in variable declarations and function signatures. The type is the name after the colon. Type annotations are always optional.

Array comprehensions - an elegant syntax for expressions that operates on lists and arrays.

Destructuring assignments - a very convenient syntax to "unpack" arrays and objects when assigning.

Multiline regular expressions - allows more readable regular expressions with whitespace and comments.

Triple quoting - an convenient syntax to have strings spanning multiple lines.

Namespaces adds the double-colon operator.

X Try!
Mascara JavaScript Generated JavaScript

Translating...
Show compiler settings