JSFiddle - React, Tailwind, and code Playground

by Kitson Kelly

JavaScript

class A {
	constructor(fn) {
		fn.call(this);
    this.foo = 'foo';
	}
}

class B extends A {
	constructor() {
		super(() => {
			console.log(this);
		});
    this.bar = 'bar';
	}
}

const b = new B();