Skip to main content
JourneyUncommon
Toggle theme
Sign In
Sign Up
Toggle theme
Home
/
Practice
/
JavaScript
hard
JavaScript
getters and setters
Single-choice MCQ
What does this code log?
class C { #x = 1; getX() { return this.#x; } }\nconsole.log(new C().getX());