I’m using the frankfurter currency converter API
I am playing with APIs and creating a simple currency converter.
This takes 3 inputs AMOUNT, FROM, TO.
const endPoint = 'https://frankfurter.app/latest?amount=10&from=GBP&to=EUR
I have successfully returned this from xhr.response - Inputted values: 10, from = GBP to = EUR.
I can then console.log(xhr.response.rates.EUR) to get the EUR amount. This is only for this specific example. Is there any way to make this dynamic so that any to and from can be inputted.
Something like this?