I'm sorry this will seem like nitpicking, but I believe concepts are truly important: every property, unless static (which I don't believe JS has, but I might be wrong), is always being accessed "outside the class", since they are being accessed in an object, and not the class itself.
My goal is not the final result you wish (protecting the properties), but just to set OO straight.
Sammy Israwi is absolutely correct: the way to do it in OO is through what we call visibility (setting a property or method as public, protected or private), which seems to be in ES' future.
I'm sorry this will seem like nitpicking, but I believe concepts are truly important: every property, unless static (which I don't believe JS has, but I might be wrong), is always being accessed "outside the class", since they are being accessed in an object, and not the class itself.
My goal is not the final result you wish (protecting the properties), but just to set OO straight.
Sammy Israwi is absolutely correct: the way to do it in OO is through what we call visibility (setting a property or method as public, protected or private), which seems to be in ES' future.
No worries. I appreciate the way, we are tackling the flaws though. That is a good way of critiquing an article.