23. Private Variables. This seems convoluted, why would you do this?


Pretty much title, I don't know much about Javascript and very earlier learning stage.

Could someone explain why you would do this? It seems very convoluted seeing that you can still get to the information very easily even though its meant to be private.

Or is it just teaching you not to use var when making a class because its a pain to get the information back out?

Edit: Probably should have read the next lesson that kinda explains it.


Javascrpt is class-less....

== guidance ==
http://javascript.crockford.com/code.html <== code convention


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.