Enums
Enums allow a developer to define a set of named constants.
enum Direction {
Up = 1,
Down,
Left,
Right
}
Enums can have computed members.
enum ComputedEnum {
A = "A".length,
B = 2 * 2
}
Enums allow a developer to define a set of named constants.
enum Direction {
Up = 1,
Down,
Left,
Right
}
Enums can have computed members.
enum ComputedEnum {
A = "A".length,
B = 2 * 2
}