title: JS: Object Properties Change in Constructor
body: <p>I have this code:</p>
  
  <pre><code>class Obj {
      constructor() {
          this.foo = "foo";
      }
  }
  
  Object.defineProperty(Obj.prototype,'foo',{enumerable:false,writable:true});
  Object.defineProperty(Obj,'foo',{enumerable:false,writable:true});
  
  let obj = new Obj();
  
  console.log(obj);
  </code></pre>
  
  <p>And my output is:</p>
  
  <pre><code>Obj { foo: 'foo' }
  </code></pre>
  
  <p>The problem is, I defined the enumerable property as false for foo. But when in the construct I use 'this.foo' that property change it.</p>
  
  <p>I know I can put in the constructor:</p>
  
  <pre><code>Object.defineProperty(this,'foo',{enumerable:false,writable:true});
  </code></pre>
  
  <p>And my new output throws correctly:</p>
  
  <pre><code>Obj {}
  </code></pre>
  
  <p>But, my question is if is possible to change once the property of foo and not change it in the constructor?</p>
  
  <p>Thanks!</p>