javascript

Currency converter

29.01.19
1
Intermediate Consice General Concept
Card image cap AndreiDev

Looking for providing interesting animated effects to your text? Use the following code snippet for this purposez



comments (1)

Card image cap AndreiDev ()

Great stuff!!!

currency_to_symbol = function(currency) {
    var currency_symbols = {
           'USD': '$', // US Dollar
           'EUR': '€', // Euro
           'CRC': '₡', // Costa Rican Colón
           'GBP': '£', // British Pound Sterling
           'ILS': '₪', // Israeli New Sheqel
           'INR': '₹', // Indian Rupee
           'JPY': '¥', // Japanese Yen
           'KRW': '₩', // South Korean Won
           'NGN': '₦', // Nigerian Naira
           'PHP': '₱', // Philippine Peso
           'PLN': 'zł', // Polish Zloty
           'PYG': '₲', // Paraguayan Guarani
           'THB': '฿', // Thai Baht
           'UAH': '₴', // Ukrainian Hryvnia
           'VND': '₫', // Vietnamese Dong
       };
       return currency_symbols[currency] || currency
}