title: How can I guarantee that my enums definition doesn't change in JavaScript?
body: <p>Would the following make the objects fulfil all characteristics that enums have in JavaScript? Something like:</p>
  <pre class="lang-js prettyprint-override"><code>my.namespace.ColorEnum = {
    RED : 0,
    GREEN : 1,
    BLUE : 2
  }
  
  // later on
  
  if(currentColor == my.namespace.ColorEnum.RED) {
    // whatever
  }
  
  </code></pre>
  <p>Or is there some other way I can do this?</p>