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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,7 @@ let list: Array<number> = [1, 2, 3];
// For enumerations: // For enumerations:
enum Color { Red, Green, Blue }; enum Color { Red, Green, Blue };
let c: Color = Color.Green; let c: Color = Color.Green;
console.log(Color[c]); // "Green"
// Lastly, "void" is used in the special case of a function returning nothing // Lastly, "void" is used in the special case of a function returning nothing
function bigHorribleAlert(): void { function bigHorribleAlert(): void {