if (route3.length >= 100 && route3.length <= 200) {
route3.payoff = Math.floor(route3.payoff * 1.1);
} else {}
if (route3.length >= 200 && route3.length <= 300) {
route3.payoff = Math.floor(route3.payoff * 1.15);
} else {}
if (route3.length >= 300 && route3.length <= 400) {
route3.payoff = Math.floor(route3.payoff * 1.2);
} else {}
if (route3.length >= 400 && route3.length <= 500) {
route3.payoff = Math.floor(route3.payoff * 1.25);
} else {}
if (route3.length >= 500 && route3.length <= 600) {
route3.payoff = Math.floor(route3.payoff * 1.30);
} else {}
if (route3.length >= 600 && route3.length <= 700) {
route3.payoff = Math.floor(route3.payoff * 1.35);
} else {}
if (route3.length >= 700 && route3.length <= 800) {
route3.payoff = Math.floor(route3.payoff * 1.4);
} else {}
love the ifelse formatting, but why didn't you use any arrays?
or does ajax even have arrays
y'know, like this:
const int PLUS = 5;
int[] cookie = new int[PLUS];