Skip to content

Instantly share code, notes, and snippets.

@jsoverson
Created August 9, 2019 21:01
Embed
What would you like to do?
(function () {
class c {
constructor(d) {
this.target = d;
}
greet() {
console.log("Hello " + this.target);
}
setTarget(e) {
this.target = e;
}
}
const f = new c("world");
f.greet();
f.setTarget("reader");
f.greet();
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment