Commit a0ac45f9 authored by Christopher Guess's avatar Christopher Guess
Browse files

removed each and made a forloop

parent f8401de4
......@@ -13,6 +13,7 @@ var dollar_multiplier_lookup_table = {
};
function Marka(target) {
console.log(this.currencies_supported());
this.setCurrency("eur");
this.getValueInSetCurrency(200, "usd", function(value){
......@@ -210,13 +211,14 @@ Marka.prototype.retreiveExchangeRates = function(currency_one, currency_two, cal
Marka.prototype.currencies_supported = function(){
var currencies = {};
$.each(currencies_available, function(i, val){
var symbol = val.resource.fields.symbol.substring(0, 3);
var info = currency_info[symbol];
if(info){
currencies[symbol] = info;
}
})
for(var index = 1; index < currencies_available.length; index++){
var val = currencies_available[index];
var symbol = val.resource.fields.symbol.substring(0, 3);
var info = currency_info[symbol];
if(info){
currencies[symbol] = info;
}
}
return currencies;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment