easierbycode
4/29/2016 - 6:22 PM

calling-super-on-an-object-literal.js

let project = {
  getTaskCount() {
    return 50;
  }
}

let softwareProject = {
  getTaskCount() {
    return super.getTaskCount() + 25;
  }
}

Object.setPrototypeOf(softwareProject, project);

softwareProject.getTaskCount()
// 75