DEV Community

Discussion on: Javascript pattern that changed everything (for me...)

Collapse
 
kristijanfistrek profile image
KristijanFištrek

As far as I have learned, what is public is only the reference to what the private function holds. Therefore its internal state or value remains untouched from the outside, or so to speak you can not change what has been defined, you can only view or read what has been exposed. It's like having only the Read segment of CRUD, let's say.
In your analogy, it's like taking down the pants but there's a drawing of your private parts covering them 😄, you can still kind of see what they look like, but if someone were to touch it he would be touching a drawing and not a real thing.
I never thought I would enter a conversation where a correlation between man's private parts and JS pattern is drawn 🙈

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

🤣