Mascara: Next Generation JavaScript compiler

Try it Download Buy About Documentation Blog Contact

Constants

A constant is like a variable which cannot change its value after definition.
Syntax definition [Help]
const name [ : type ] = expression 
Example:
const a = 10;
const b : String = "Hello";
A const definition may occur any place where a var definition is allowed.

Any attempt to change the value of a const will result in an error.

X Try!
Mascara JavaScript Generated JavaScript

Translating...
Show compiler settings