Advanced objects - privacy

I have a few questions regarding this lesson.
First of, I tried searching MDN regarding this naming convention and couldn’t find anything. Does anyone have a link to a more “official” resource than Codecademy?

And secondly, I found this. It seems to be quite new (Firefox implemented in version 90, current version is 90.0.2), but this kind of makes the underscore obsolete, correct?

I don’t think you’ll find anything “official”, because the use of an underscore to indicate that the object in question is private is simply a convention to work around JavaScript’s lack of a private concept.

Not quite, because that only deals with classes. If what you’re working on and wish to be private is inside a class, then sure that’ll work - and JavaScript will enforce the privacy.

If you were working with a factory function, though, there’s still no authoritative “private” identifier so you’d likely fall back to the underscore convention.

There’s an interesting article on this here: