JavaScript Professional — Hard
Key points
- Private fields in JavaScript are inaccessible from outside the class
- The #count field is private in the Counter class
- Accessing a private field outside the class results in a SyntaxError
Ready to go further?
Related questions
