Created
April 5, 2019 16:31
-
-
Save normanzb/bf908b2ddab508e7c327e59500da8d0a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function Ctor() { | |
} | |
Ctor.prototype.data = {counter: 0} | |
Ctor.prototype.bump = function() {this.data.counter++;} | |
a = new Ctor() | |
b = new Ctor() | |
a.bump(); | |
console.log(a.data.counter) | |
console.log(b.data.counter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment