How do you efficiently use int to enumerate in javascript?
Say I have this listing
enuTable = // Table enum
{
enuUnknown: 0,
enuPerson: 1,
enuItem: 2,
enuSalary: 3,
enuTax: 4,
enuZip: 5,
enuAddress: 6,
enuLocation: 7,
enuTasks: 8,
};
In the code part, I get the return value from an AJAX call, which is a number corresponding to one of the above tables.
, , ( ) int ? , , . , , , . , , .