Sum Items from Multi Checkbox and input in Number Field

@archaeous Ok, I have made some great progress. I ended up wrapping it in a function so I could do some math and add it together and put the total in the input field.

$w.onReady(function () {
$w("#checkboxGroup1").onChange(Price);
$w("#checkboxGroup2").onChange(Price);
});

function Price() {
 let checkBoxValues = $w('#checkboxGroup1').value
 let totalPrice = 0
 for (let i = 0; i < checkBoxValues.length; i++){
        totalPrice = totalPrice + parseFloat(checkBoxValues[i].substring(1))
 } 
 let checkBoxValues2 = $w('#checkboxGroup2').value
 let totalPrice2 = 0
 for (let i = 0; i < checkBoxValues2.length; i++){
        totalPrice2 = totalPrice2 + parseFloat(checkBoxValues2[i].substring(1)) 
 } 
$w('#input4').value = (totalPrice + totalPrice2) ;
}

This works great however I want to add a drop down that multiplies the total value by 2 or 4 or 6 depending on how many people are ordering this. I tried to simply do this:

$w('#input4').value = ($w('#dropdown1').value * totalPrice + totalPrice2) ;
}

However I get really weird numbers.
Ex, If they Select 2 People with the value set to 2 in the drop down.
Then select one of the ingredients that are $2.00 I get

2.0020

Not sure what I did wrong on this if I pick no ingredients and only a drop down value I get 2.000 or 4.000 or 6.000 and the other inputs become Cents and not dollars. Its like the decimal place moves on them.