Variables
Reference data by storing it in a variable; it's the way of the future!
Constants are statically declared within a module and can be referenced within that module or outside of it by way of an import
.
const MY_CONST = "my const";
Closure-Local
Variables can be declared within any closure (such as in a view
or a func
) and referenced by other expressions within the same closure.
func closureExample(value: number) -> {
let result = value + 6;
result;
}
Last updated
Was this helpful?