Pre-ES6
ES51995 – 2014One function scope, one binding keyword, and callbacks all the way down. Everything that came later is a reaction to this era's sharp edges.
There are no classes underneath — only objects linked to other objects. `class` in later eras is syntax over this exact mechanism.
function Signal(name) {
this.name = name;
}
Signal.prototype.describe = function () {
return "Signal<" + this.name + ">";
};
var s = new Signal("tick");
console.log(s.describe());
console.log(Object.getPrototypeOf(s) === Signal.prototype);