javascripts and Enum ( for loops get name)

#pragma strict

public class Attributes extends BaseStat {

public function Attribute() {
	SetExpToLevel(50);
	SetLevelModifier(1.05);
}

}

//List of attributes in Game
public enum AttributeName {
Might,
Constitution,
Nimbleness,
Speed,
Concentration,
Willpower,
Charisma
}

//then i want to get the gui function to return trough the for loop Might, Constitution, ect how can i achieve this on javescript???

function OnGUI() {
GUI.Label(Rect(10,10,50,25),"Name: ");
_toon._name = GUI.TextArea(Rect(65,10,100,25),_toon._name);

for(var cnt : int = 0; cnt < Enum.GetValues(AttributeName).Length; cnt++) {
	GUI.Label(Rect(10,40 + (cnt * 25),100,25), Enum.GetValues(AttributeName.ToString()));
	GUI.Label(Rect(115,40 + (cnt * 25),30,25),_toon.GetPrimaryAttribute(cnt).AdjustedBaseValue.ToString());
}

}

heres a video tutorial how to do it in c# but i dont know how to translate it :frowning:
help me

import System;

enum positionInterpolation { easeInOutQuad = 0,
easeInOutCubic = 1,
easeInOutQuart = 2,
easeInOutQuint = 3,
easeInOutSine = 4,
easeInOutExpo = 5,
easeInOutCirc = 6,
linear = 7};

var curentInterpolation : positionInterpolation; 

then in your code do:

for (var e:int=0; e < Enum.GetValues(typeof(positionInterpolation)).Length; e++){
    if (GUI.Button(Rect(95,50+p,105,18), Enum.GetValues(typeof(positionInterpolation))[e].ToString()))){
    // do your stuff here
    }  
}

do not forget about “import System” at begining of your script.