title: What happens when setting object property without setter in javascript
body: <pre><code>var vehicle = function(){
  var type;
  var tyre;
  
  this.tellTyres = function(){
    console.log(type + " has " + tyre + " tyres");
  };
  
  this.__defineGetter__("type", function(){
    return type;
  });
  this.__defineSetter__("type", function(val){
    type = val;
  });
  this.__defineGetter__("tyre", function(){
    return tyre;
  });
  //   this.__defineSetter__("tyre", function(val){
  //     tyre = val;
  //   });
  
  };
  
  var car = new vehicle();
  car.type = "Car";
  car.tyre = 4;
  
  console.log(car.tyre);
  
  car.tellTyres();
  </code></pre>
  
  <p>I was learning about the getter and setter. Then I realized Javascript is not throwing any error while setting the value of <code>car.tyre</code> without having its setter method.</p>
  
  <p>What happens to the <code>car.tyre</code> property outside the constructor. Where does the value 4 store? Does it override?</p>