Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var peopleAmount = [0,0,0,0,0,0,0,0,0];
- function makeList(calculation) {
- for(i=0; i<peopleAmount.length; i++) {
- if(calculation >200 && calculation < 300) {
- peopleAmount[0] += 1;
- }
- else if(calculation > 300 && calculation < 400) {
- peopleAmount[1] += 1;
- }
- ....so on and so forth
- }
- }
- function calculate() {
- var salesAmount = document.getElementById("salesAmount");
- var salesAmount = parseInt(salesAmount.value);
- var calculation = salesAmount *.09;
- var calculation = calculation + 200;
- makeList(calculation);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement