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