title: declaring protected variable in javascript
body: <p>How do i declare protected variable. Let me give an example here</p>
  
  <pre><code>// Constructor
  function Car(){
  
     // Private Variable
     var model;
  }
  
  // Public variable
  Car.prototype.price = "5 Lakhs";
  
  // Subtype
  function Indiancar(){
  }
  
  // Prototype chaining
  Indiancar.prototype = new Car();
  
  
  // Instantiating Superclass object
  var c = new Car();
  
  // Instantiating subclass object
  var ic = new Indiancar();
  </code></pre>
  
  <p>in this I would like to have a variable that is accessible as ic.variabl that is also present in car class.</p>