I have 4 fields that needs to be summed up which I do with sum up with `$('select :selected').each(function() {` But somehow the below code outputs 99 while it needs to output 72.

```
// Count for ShowerCoins
$(document).ready(function() {
$('select.countForShowerCoins').on('change', function() {
  var sum = 0;

   $('select :selected').each(function() {
       sum += Number($(this).val() * 3) * $('select[name=howManyNights]').val();
   });

$(".result").html(sum);
  });

});

```

The `sum` is "4 input fields with a value of the number 2 each" which is 8 summed up. Then multiplied by 3 and that is 24, then I multiply it with the amount of night's which is 3. 24 \* 3 = 72. But somehow I get a output of 99. 

Does someone know how this can be, am I missing something? I used `parseInt(` on the `$('select[name=howManyNights]').val();` but that didn't change anything. I noticed that it is because of the `sum` because when I replace that with a static number the calculation works.

But I don't know how to fix it.