How I learned from a crazy idea / The 'old' way

by Arnaud Buchholz

HTML

<script src="https://arnaudbuchholz.github.io/blog/jsfiddle-assert.js"></script>

JavaScript

function OldA () {
  this._a = "A";
}

OldA.prototype.a = function () {
  return this._a;
};

var a = new OldA();
assert(() => a instanceof OldA);
assert(() => a.a() === "A");