Aisha is still building her tip calculator, using the same rules as before: Tip 15% of the bill if the bill value is between 50 and 300, and if the value is different, the tip is 20%.
- Write a function
calcTip
that takes any bill value as an input and returns the corresponding tip, calculated based on the rules above. Use the function type you like the most.
If i pass the value 275 the the function calcTip
the function should return or console log 'The bill was 275, the tip was 41.25, and the total value 316.25'
Good Luck 😀