why make non-privileged methods?
Posted
by aharon
on Stack Overflow
See other posts from Stack Overflow
or by aharon
Published on 2010-06-18T01:30:21Z
Indexed on
2010/06/18
1:33 UTC
Read the original article
Hit count: 291
JavaScript
I'm learning JavaScript, and I can't understand why you'd make methods that aren't 'privileged,' that is, that aren't defined in the constructor but rather the class' prototype.
I understand the idea of encapsulation and all, but you never encapsulate parts of a class from the rest of it in most of the OO world.
© Stack Overflow or respective owner