Created
September 21, 2021 07:55
-
-
Save YonatanKra/f71ae8690ad23af9061f6141327464c6 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 MyClass { | |
#somethingCool = 5; | |
get somethingCool() { | |
return this.#somethingCool; | |
} | |
set somethingCool(value) { | |
this.#somethingCool = value; | |
} | |
} | |
const x = new MyClass(); | |
JSON.stringify(x); // '{}' | |
x.somethingCool = 10; | |
JSON.stringify(x); // '{}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment