// setting new final score
function settingFinalScore() {
newFinalScore = +prompt("Please set new Final Score", 100);
finalScore = newFinalScore;
alert(newFinalScore);
alert(finalScore);
}
function settingFinalScore() {
let score = 0;
return () => {
score += Math.ceil(prompt('Please set new Final Score', 100));
return score;
}
}
const updateFinalScore = settingFinalScore();
const score = updateFinalScore();
console.log(score);