Created
September 25, 2017 19:32
-
-
Save matheus-rossi/e734194616f241c08f317e4012a18a88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convertCurrencyAlt = async (from, to, amount) => { | |
const countries = await getCountriesAlt(to) | |
const rate = await getExchangeRateAlt(from, to) | |
const exchangedAmount = amount * rate | |
return `${amount} ${from} is worth ${exchangedAmount} ${to}. ${to} can be used in the following countries: ${countries.join(', ')}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment