When do you make an underscore in front of an instance variable? [duplicate]

A lot of people use this for private variables, to differentiate between private variables and public variables within an object.

It is a completely optional way of working.

Leave a Comment