Java-like enumeration support in JavaScript.