I have html5 score base game. when game over, end screen shows total score via the below function:
this.show = function (a)
{
b.text = TEXT_GAMEOVER;
e.text = TEXT_SCORE + ": " + a;
d.visible = !0;
};
Now i want to get total score that is a or e.text in the onclick button release function:
var a;
this._onButSendRelease = function ()
{
console.log(a);
}
but a is undefined, Please help me how i can do that.
function (a)will create a new local variableaand will not change your exisitngavariable.