enum typescript to number code example
Example: enum to number typescript
enum UserResponse {
No = 0,
Yes = 1,
}
console.log(UserResponse.Yes) //logs : 1
enum UserResponse {
No = 0,
Yes = 1,
}
console.log(UserResponse.Yes) //logs : 1