constcoffeeAmounts={'Americano':2.20,'Latte':2.30,'Flat White':2.40,'Filter':3.50}constcoffee=(coffeeType,cash)=>{returncoffeeAmounts[coffeeType]===cash?"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.
Discussion on: Daily Challenge #56 - Coffee Shop
For further actions, you may consider blocking this person and/or reporting abuse