Set Score

Sets the current score.

0set score
function setScore(value: number): void;

Parameters

  • a number that represents the new score.

Examples

This program is a simple game. Press button A as much as possible to increase the score. Press B to display the score and reset the score.

score0set scoreshownumberon buttonBpressed1change score byon buttonApressed

See Also

score, add score, start countdown

score0set scoreshownumberon buttonBpressed1change score byon buttonApressed