Created
May 29, 2011 03:32
-
-
Save KamaKAzii/997441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var calcIndividual = function (input) { | |
if (input < 6001) { | |
var output = 0; | |
} | |
if (6000 < input < 35001) { | |
var output = ((input - 6000) * 0.15); | |
} | |
if (35000 < input < 80001) { | |
var output = (4350 + ((input - 35000) * 0.3)); | |
} | |
if (80000 < input < 180001) { | |
var output = (17850 + ((input - 80000) * 0.38)); | |
} | |
if (input > 180000) { | |
var output =(55850 + ((input - 180000) * 0.45)); | |
} | |
return output; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have bugs. The values 6000, 35000, 80000 and 180000 will return bogus output.