Monday, September 30, 2019

Beware of checking to see if an enum is truthy in TypeScript.

The zero is going to be a legitimate value right? It represents the first thing in the enum, enum being short for enumeration or enumerated type and the count upwards being zero-based.

No comments:

Post a Comment