Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptgetters and settersSingle-choice MCQ

What does this code log?

class C { #x = 1; getX() { return this.#x; } }\nconsole.log(new C().getX());