In this blog post, we examine a pattern for implementing enums in JavaScript that is based on classes. We’ll also take a look at Enumify, a library that helps with the enum pattern. Implementing enums: first attempts # An enum is a type that consists of a set of values. For example, TypeScript has built-in enums and with them, we can define our own boolean type: enum MyBoolean { false, true, } Or