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


#1

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.


#2

@microninja62024,
Javascrpt is class-less....

== guidance ==
www.crockford.com
http://javascript.crockford.com/code.html <== code convention
http://javascript.crockford.com/survey.html
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript


#3

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