Skip to content

Instantly share code, notes, and snippets.

@uyu423
Created April 24, 2017 06:44
Show Gist options
  • Save uyu423/411ceaa456cedfc7f95ff6a89dcddb46 to your computer and use it in GitHub Desktop.
Save uyu423/411ceaa456cedfc7f95ff6a89dcddb46 to your computer and use it in GitHub Desktop.
class A {
constructor(value) {
this.value = value
}
adder() {
this.value += 1;
}
}
const v = new A(10);
v.adder();
console.log(v); // showing 11, not Object;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment