The freeCodeCamp Forum
Object Oriented Programming: Use Closure to Protect Properties Within an Object from Being Modified Externally
JavaScript
ILM
Split this topic
March 22, 2021, 4:40pm
3
A post was split to a new topic:
Object properties
show post in topic
Related topics
Topic
Replies
Views
Activity
Changing a variable with closure
JavaScript
4
245
November 21, 2022
Confuse of Use Closure to Protect Properties Within an Object from Being Modified Externally
JavaScript
5
444
January 3, 2022
Object Oriented Programming - Use Closure to Protect Properties Within an Object from Being Modified Externally
JavaScript
3
292
May 29, 2023
I get lost, here i can access the private variable and change it outside the context of the function; so how it's called private in this way?
JavaScript
2
298
June 1, 2021
I created a variable within the constructor variable, how come that I can still change its value?
JavaScript
3
410
March 5, 2022