\s
. document.querySelector('form').addEventListener('input', function() {
var selected = this.querySelectorAll('input:checked');
var sum = 0;
for (var i = 0; i < selected.length; i++) {
sum += parseFloat(selected[i].value);
}
document.querySelector('#pSumma').innerText = '$' + sum.toFixed(2);
});