Create the "Taxi Fare Calculator" app.
The user enters the trip distance in km and the trip time in minutes, and also marks whether the trip was at night (after 22:00). After clicking the button, the final fare needs to be calculated.
All the logic needs to be split into exactly 4 functions:
calculateDistanceCost,
returns the distance cost: distanceKm * 5
calculateTimeCost,
returns the time cost: minutes * 0.5
calculateNightSurcharge(amount) — takes only the amount.
Inside the function itself, create a variable that stores the "night" flag
(for example let isNight = true; or false).
If isNight === true — returns amount * 1.2,
otherwise — returns amount unchanged.
calculateTotalFare() — all the other functions are called inside it.
The final result needs to be displayed on the screen.