JSFiddle - React, Tailwind, and code Playground
Babel + JSX
class Foo {
static getDefaultName() {
return 'World';
}
static sayHello(name = this.getDefaultName()) {
return `Hello ${name}!`;
}
}
document.write(Foo.sayHello());
class Foo {
static getDefaultName() {
return 'World';
}
static sayHello(name = this.getDefaultName()) {
return `Hello ${name}!`;
}
}
document.write(Foo.sayHello());