Introduction-to-javascript/lessons/classes/exercises/methods


#1

From https://www.codecademy.com/courses/introduction-to-javascript/lessons/classes/exercises/methods?action=resume_content_item

In the example above, we add getter methods for name and behavior . Notice, we also prepended our property names with underscores ( _name and _behavior ), which indicate these properties should not be accessed directly.

This last part - which indicate these properties should not be accessed directly. I checked the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get and other articles, but I didn’t find any documentation to endorse this statement. Could you help me?

Thanks
Afonso


#2

Hide The Backing Variable Of Object Properties/Attributes Using ES6 Symbols

The above was found in this SERP

backing variables