I need to sum the span elements so I edited Akhil Sekharan's answer below.
var arr = document.querySelectorAll('span[id^="score"]');
var total=0;
for(var i=0;i<arr.length;i++){
if(parseInt(arr[i].innerHTML))
total+= parseInt(arr[i].innerHTML);
}
console.log(total)
You can change the elements with other elements link will guide you with editing.