BananaMaster

45.1 - Taxi Fare Calculator, practice (JS lessons — arguments and return)

If you forgot something — click to go to the lesson.

📘 Task: Taxi Fare Calculator

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.

🧩 Main condition: architecture of 4 functions

All the logic needs to be split into exactly 4 functions:

💰 Rates (hardcoded as constants):

📐 Functions you need to write: