I am trying to understand inheritance in javascript
function baseClass(name) {
   this.name = name;
   this.getName = function() {
       return this.name;
   }
}
function subClass(id, company){
       baseClass.call(this);
       this.id = id;
       this.company = company;
       this.toString = function() {
           return name + "\n" + this.id + "\n" + this.company; 
       }  
   }
subClass.prototype = Object.create(baseClass);
   var s = new subClass();
   s.toString();  //here the name property from the baseClass is not displayed.
How do correctly implement inheritance (classical / prototypical)
 
     
     
    