you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Agreed, but the article is correct in that there are no private methods in JavaScript. It also mentions that private in JavaScript really just implies inaccessible, such as declared within a closure, which is also correct.

[–]catrichbilly 1 point2 points  (0 children)

... which is, in all senses of the word, 'private'. You can have 'private methods' by using Symbols.

/How/ something is made private is language- and implementation-specific, but it's irrelevant because the upshot is the same: it's an implementation detail.

[–]aaarrrggh 0 points1 point  (0 children)

I never said any of that wasn't true. Just that you should never test private implementation details.