Advertisement
Guest User

Currency Converter

a guest
Jan 14th, 2020
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function currencyConverter([arg1,arg2,arg3]){
  2.     let fixedRate = {USD: 1.79549, EUR: 1.95583, GBP: 2.53405, BGN: 1 };
  3.     let result = arg1 * fixedRate[arg2] / fixedRate[arg3];
  4.     return `${result.toFixed(2)} ${arg3}`;
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement