functionpromo(order,price,customers){returnObject.keys(customers).filter(c=>customers[c].filter(p=>p>=price).length>=order);}// Test 1promo(min_orders,min_price,customers)// ["Jane Doe"]// Test 2promo(min_orders,min_price,customers)// ["Joey Bonzo"]// Test 3promo(min_orders,min_price,customers)// ["Gorou Hironaka"]
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Javascript