CLASSES Inheritance V

https://www.codecademy.com/courses/learn-intermediate-javascript/lessons/classes/exercises/methods

“Notice, we also prepended our property names with underscores (_name and _behavior ), which indicate these properties should not be accessed directly.”

Can someone help me understand what is the use of putting underscores before property names, Thank you.

reactjs - What is the underscore "_" in JavaScript? - Stack Overflow.

It is just convention, it is there to tell other people who read your code that they should treat it like a private variable, it doesn’t actually change anything though.