JSFiddle - React, Tailwind, and code Playground

by levchenko_d

Babel + JSX

class User {
	constructor(name = "No Name", age = -1) {
    this.name = name;
    this.age = age;
  }
  
  greet(){
  	const {name} = this;
  	console.log(`Hi ${name}`);
  }
}

class Person extends User {
	hi(){
  	super.greet();
  }
  
  yello(){
  	this.hi();
  }
}

const u = new Person('Bob', 22);


u.yello();