Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript enum get key by value

enum Status{
Active = 'Active',
Inactive = 'Inactive'
}

let status = STATUS.Active

console.log(status)
output: "Active"
Source by www.crojach.com #
 
PREVIOUS NEXT
Tagged: #typescript #enum #key
ADD COMMENT
Topic
Name
9+2 =