easierbycode
4/29/2016 - 6:08 PM

overriding a method in subclass

overriding a method in subclass

class Project {
  getTaskCount() {
    return 50;
  }
}

class SoftwareProject extends Project {
  getTaskCount() {
    return 100;
  }
}

let sp = new SoftwareProject();

sp.getTaskCount()
// 100