function updateScore(increment) {
game.score = game.score + increment;
var numberArray = (game.score + "").split("");
var htmlForScore = "";
numberArray.forEach(function (number) {
htmlForScore = htmlForScore + "<li style=\"background-image: url('score_" +
number + ".png');\"></li>";
});
$('#whatever ul').html(htmlForScore);
}
No comments:
Post a Comment