title: Combining a variable name with a number in javascript
body: <p>So I have these 19 variables, "isTaken1-19" and I have everything set up to go through this function </p>
  
  <pre><code>function addtoList(localItemCode){  
  
          if(checkForDuplicate(localItemCode) == 1){
            document.getElementById('listItem' + (listTracker+1)).innerHTML = whatToSay;
            document.getElementById('amountItem' + (listTracker+1)).innerHTML = isTaken;
            listTracker += 1;
            addOne(localItemCode);
          }else if(checkForDuplicate(localItemCode) == 0){
              addOne(localItemCode);
          }
  }
  </code></pre>
  
  <p>but on the "getElementById('amountItem' + (listTracker+1)).innerHTML = isTaken; instead of just isTaken I want it to be isTaken + localItemCode, in the sense that is knows if it's istaken1,isTaken2, isTaken5, etc. Like how ('listItem' + (listTracker+1)) is. IS this possible in javascript?</p>
  
  <p>I apologize for my lack of terminology, I think what i'm trying to do is concatenate? I'll use an array if needed, I just wanted to see if this was possible.</p>