JSFiddle - React, Tailwind, and code Playground
HTML
<div id="pakker">
<input type="checkbox" value="39" checked />test 1<br/>
<input type="checkbox" value="79" />test 2<br/>
<input type="checkbox" value="29" checked />test 3<br/>
<input type="checkbox" value="49" />test 4<br/>
ect
</div>
JavaScript
var total = 0;
$("#pakker input[type='checkbox']:checked").each(function() {
total += parseInt(this.value, 10);
});
console.log(total);