Coding Challenge: Higher-Order Function
Let's use higher-order functions and currying in this challenge.
We'll cover the following...
Problem statement
The buyTicket
function below calculates the price of a ticket and saves the request in our mock database. The price logic is currently hardcoded, but we’d like to change it because in the future, we might prefer to ask wealthy ...