class Hey {
constructor (something) {
this.is = something
}
get something () {return this.is}
set something (clever) {this.is = clever}
regular (method) {return this.is + method}
static something () {return 'amazing'}
}var hey = new Hey('nasty')console.log(hey.something)// nastyhey.something = 'really'console.log(hey.something)// reallyconsole.log(hey.regular('method'))// reallymethodconsole.log(Hey.something())// amazingvar Hey = (something) => {
var self = {
something,
regular: (method) => self.something + method
}
return self
}
Hey.something = () => 'amazing'