constgetACoffee=(amount)=>{constmenu={'2.2':'Americano','2.3':'Latte','2.4':'Flat white','3.5':'Filter'},coffeeType=menu[`${parseFloat(amount)}`];returncoffeeType?`Here is your ${coffeeType}, have a nice day!`:'Sorry, exact change only, try again tomorrow!'};
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.
My solution in js