Purpose of underscore in the keepyup game example?

In the keepyup game example, as well as in other areas of playcanvas user manual/tutorials, I keep seeing naming conventions like

what is the reason for the underscore?


var Game = pc.createScript('game');

Game.attributes.add('uiMenu', {type: 'entity'});
Game.attributes.add('uiInGame', {type: 'entity'});
Game.attributes.add('uiGameOver', {type: 'entity'});
Game.attributes.add('audio', {type: 'entity'});

Game.STATE_MENU = 'menu';
Game.STATE_INGAME = 'ingame';
Game.STATE_GAMEOVER = 'gameover';

// initialize code called once per entity
Game.prototype.initialize = function() {
    this._state = Game.STATE_MENU;
    this._score = 0;


    window.addEventListener("resize", this.setResolution.bind(this));

    // listen to events from the UI
    this.app.on("ui:start", this.start, this);
    this.app.on("ui:reset", this.reset, this);

Just a naming convention. Some people (including myself) use it as a visual way of saying “this is a ‘private’ variable and should not be accessed outside this class/object”.