Constants
Constants are variables that cannot be mutated after their declaration, they are scoped to the module level and they can hold values of any type.
info
Variables in Knot are immutable except for within the scope of state entities (coming soon!).
- Knot
- TypeScript
knotconst empty = nil;const boolean = true;const integer = 1234;const float = 56.78;const string = "this is a string";const element = <div />;
knotconst empty = nil;const boolean = true;const integer = 1234;const float = 56.78;const string = "this is a string";const element = <div />;
tsxconst empty = undefined;const boolean = true;const integer = 1234;const float = 56.78;const string = "this is a string";const element = <div />;
tsxconst empty = undefined;const boolean = true;const integer = 1234;const float = 56.78;const string = "this is a string";const element = <div />;