mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Updates enum docs (#4266)
This commit is contained in:
parent
04690c7057
commit
0320846c0c
@ -48,6 +48,7 @@ let list: Array<number> = [1, 2, 3];
|
||||
// For enumerations:
|
||||
enum Color { Red, Green, Blue };
|
||||
let c: Color = Color.Green;
|
||||
console.log(Color[c]); // "Green"
|
||||
|
||||
// Lastly, "void" is used in the special case of a function returning nothing
|
||||
function bigHorribleAlert(): void {
|
||||
|
Loading…
Reference in New Issue
Block a user