title: Javascript dynamic variable name in loop
body: <p>I can't figure out how to use dynamic variable in JS.. I have a list of ticker, some balances associated, and I want to display each 'balance sticker' in my loop, dynamically.
  But it seems like it's not using the append I add to the variable at all?</p>
  
  <pre><code>var ticker = [CURRENCY1,CURRENCY2,CURRENCY3];
  var balancesCURRENCY1 = 20;
  var balancesCURRENCY2 = 30;
  var balancesCURRENCY3 = 40;
  
  for (var tick in ticker) {
  
    if (('balances'+ticker[tick]) != 0) {
      console.log(true);
    }     
  
  }
  </code></pre>