How I learned from a crazy idea / The ES6 way (2)

by Arnaud Buchholz

HTML

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

JavaScript

class Es6A {
  constructor (value) {
    this._a = value;
  }

  a () {
    return this._a;
  }
}

assert(() => typeof Es6A === "function");
assert(() => Es6A.length === 1);
assert(() => typeof Es6A.apply === "function");