easierbycode
4/29/2016 - 6:28 PM

class-instance-properties.js

class Project {
  constructor() {
    this.location = 'Mazatlan';
  }
}

class SoftwareProject extends Project {
  constructor() {
    super();
    this.location = this.location + ' beach';
  }
}

let sp = new SoftwareProject;

sp.location;
// "Mazatlan beach"