JSFiddle - React, Tailwind, and code Playground

by Artem

JavaScript

'use strict';

class Foo() {
	bar() {
		return 'fire';
	}
	constructor() {
		console.log(this.bar());
	}
}

class Bar extends Foo {
	bar() {
		return 'water';
	}
}

new Foo();
new Bar();