class A {
#x;
constructor(x) {
#x = x;
this.foo = this.foo.bind(new A(10));
}
foo() {
console.log(#x, this.#x); // ?
}
}
const a = new A(20);
a.foo(); // ?
Last active
July 29, 2017 09:58
-
-
Save boopathi/721228f8c136029bb1142aee29a20199 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment