TheShadow
public javascript v1 · immutablevar g_lives = 3;// our functionfunction isAlive(){ if (g_lives <= 0) { return false; } return true;}/* do some stuff in the game then check if the player is alive.*/if (isAlive() == false){ game_end();}