Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get enum item name in javascript

enum Enum {
  A,
}
 
let a = Enum.A;
let nameOfA = Enum[a]; // "A"
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #enum #item #javascript
ADD COMMENT
Topic
Name
3+3 =