switch (output){
case 4: discont = 1 - 0.05; discount = '5%'; break;
case 5:
case 6: discont = 1 - 0.07; discount = '7%'; break;
case 7:
case 8: discont = 1 - 0.10; discount = '10%' break;
case (output>=9 && output<=12): discont = 1 - 0.12; discount = '12%'; break;
case (output>=9 && output<=12): discont = 1 - 0.12; discount = '12%'; break;
switch (output) {
case ...
case ...
default: if (output>=9 && output<=12) {
discont = 1 - 0.12; discount = '12%';
}
}
var output=12;
switch (true) {
case output === 4: alert('4'); break;
case output === 5: alert('5'); break;
case output === 6: alert('6'); break;
case output === 7: alert('7'); break;
case output === 8: alert('8'); break;
case (output>=9 && output<=12): alert('>=9 && <=12');break;
case (output>=13 && output<=15): alert('>=13 && <=15');break;
}