Created
April 24, 2017 06:44
-
-
Save uyu423/411ceaa456cedfc7f95ff6a89dcddb46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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