Using the following code I'm trying to calculate AK based on brutojaarloon. Even if the value of brutojaarloon exceeds 21430, the first else if statement is still executed.
I understand that if brutojaarloon is higher than 21430, it's also higher than 9921, but that's what the && is supposed to catch.
if (brutojaarloon < 9921) {var AK = brutojaarloon * 0.02812 ; }
else if (brutojaarloon => 9921 && brutojaarloon < 21430)
{ var AK = ((brutojaarloon - 9921) * 0.28812) + 279; }
else if (brutojaarloon => 21430 && brutojaarloon < 34954)
{ var AK = ((brutojaarloon - 21430) * 0.01656) + 3595; }
Aucun commentaire:
Enregistrer un commentaire