stijndewitt.com
Enums in Javascript
TL;DR: Enums in Javascript Define your enum like so: var SizeEnum = { SMALL: 1, MEDIUM: 2, LARGE: 3, }; Then use it like so: var mySize = SizeEnum.SMALL; If you want the enum v…