From 0320846c0c718768ed12be7a5fd0c5e6b1c5f1ed Mon Sep 17 00:00:00 2001 From: Shafkathullah Ihsan Date: Tue, 9 Nov 2021 04:06:40 +0530 Subject: Updates enum docs (#4266) --- typescript.html.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'typescript.html.markdown') diff --git a/typescript.html.markdown b/typescript.html.markdown index f7a41ce1..64be9401 100644 --- a/typescript.html.markdown +++ b/typescript.html.markdown @@ -48,6 +48,7 @@ let list: Array = [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 { -- cgit v1.2.3