Guest User

Untitled

a guest
Nov 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. function country() {
  2. return '{"RU": 15, "US": 29, "CH": 67}';
  3. }
  4.  
  5. function countryI (amount, from, to) {
  6. if (country) {
  7. try {
  8. let a = JSON.parse(country());
  9. return amount * a[from] * a[to];
  10. } catch(err) {
  11. console.log(err.name, err.message);
  12. }
  13. }
  14. }
  15.  
  16. console.log(countryI(79, 'RU', 'US'))
Add Comment
Please, Sign In to add comment