title: Looping through an enum, TypeScript and JQuery
body: <p>Hello im trying t develop a straight forward todo app using TypeScript and JQuery. I have an enum that lists task types: </p>
  
  <pre><code>export enum TaskType { FrontEnd, BackEnd, Designer };
  </code></pre>
  
  <p>However looping through the emum using jquery.each or for loop, i get the following result, (values then indexes):</p>
  
  <pre><code>        FrontEnd, BackEnd, Designer, 0, 1, 2
  </code></pre>
  
  <p>The following is the code i loop through the enum:</p>
  
  <pre><code>        constructor(e?: Object) {             
  
              var template = this.FormTemplate;
  
              $(e).append(template);
  
              var sel = template.find('select');
  
              /*$.each(TaskType, function (index, el) {
                  sel.append("&lt;option value='" + index + "'&gt;" + el + "&lt;/option&gt;");
              });*/
  
              for(var i=0; i &lt; (typeof TaskType).length; i++){
                  sel.append("&lt;option value='" + TaskType[i] + "'&gt;" + TaskType[i] + "&lt;/option&gt;");
              }
  
          }
  </code></pre>
  
  <p>Can someone tell me why this is?</p>