This project is a JavaScript exercise to calculate the total price of a ticket based on the number of kilometers and the age of the passenger. The price of the ticket is determined by the kilometers (0.21 € per km). A discount of 20% is applied for minors and 40% for over 65s. The final price will be displayed with a max of 2 decimals.
This project is a JavaScript exercise to calculate the total price of a ticket based on the number of kilometers and the age of the passenger. The price of the ticket is determined by the kilometers (0.21 € per km). A discount of 20% is applied for minors and 40% for over 65s. The final price will be displayed with a max of 2 decimals.