select.onchange = function() { ul.innerHTML = ''; switch(this.value) { case '1': var newArr = cups.filter((item) => { return item.sales<100 }) break; case '2': var newArr = cups.filter((item) => { return item.sales<=500 && item.sales>=100 }) ...