1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-13 18:24:39 +02:00

Updates enum docs (#4266)

This commit is contained in:
Shafkathullah Ihsan
2021-11-09 04:06:40 +05:30
committed by GitHub
parent 04690c7057
commit 0320846c0c

View File

@@ -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 {