Skip to content
Snippets Groups Projects
Commit 2b558161 authored by Ghulam Murtaza's avatar Ghulam Murtaza Committed by Frank Duncan
Browse files

NaN values and ScoreWithoutTextBlock values handled

parent 960c8815
1 merge request!14Lfc 7 improvements
......@@ -19,7 +19,10 @@
function calculate_score() {
let score = 0;
filtered_selectors.forEach(function (selector) {
score += parseInt(selector.value);
const value = parseInt(selector.value);
if (!isNaN(value) && value !== 99) {
score += value;
}
});
$('.form--score-box').text('Score: ' + score);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment