{"ScriptPreparationCode":"class Person {\r\n\tstatic #counter = 0\r\n\t#age\r\n\tconstructor(name, age) {\r\n\t\tthis.name = name;\r\n\t\tthis.#age = age;\r\n\t}\r\n\tshowPublic() {\r\n\t\treturn this.name;\r\n\t}\r\n\tshowPrivate() {\r\n\t\treturn this.#age;\r\n\t}\r\n}\r\n\r\nwindow.__person = new Person(\u0022j\u0022, 22)\r\n\r\n\r\n// WeakMap\r\nconst privKs = new WeakMap();\r\n\r\nconst proto = {\r\n\tshowPrivate() {\r\n\t\treturn privKs.get(this).age\r\n\t},\r\n\tshowPublic() {\r\n\t\treturn this.name\r\n\t}\r\n}\r\nfunction User(name, age) {\r\n\tconst obj = {name, age}\r\n\tprivKs.set(obj, {age})\r\n\treturn Object.setPrototypeOf(obj, proto)\r\n}\r\n\r\nwindow.__user = User(\u0022j\u0022, 11)\r\n\r\n\r\n// Symbols\r\nconst priv_ = Symbol(\u0022private data\u0022)\r\n\r\nconst proto2 = {\r\n\tshowPrivate() {\r\n\t\treturn this[priv_].age\r\n\t},\r\n\tshowPublic() {\r\n\t\treturn this.name\r\n\t}\r\n}\r\n\r\nfunction Teacher(name, age) {\r\n\tconst obj = {name, [priv_]: {age}}\r\n\treturn Object.setPrototypeOf(obj, proto2)\r\n}\r\n\r\nwindow.__teacher = Teacher(\u0022j\u0022, 22)","TestCases":[{"Name":"Class","Code":"window.__person.showPrivate()","IsDeferred":false},{"Name":"WeakMap","Code":"window.__user.showPrivate()","IsDeferred":false},{"Name":"Symbols","Code":"window.__teacher.showPrivate()","IsDeferred":false}]}