139
rated 0 times
[
144]
[
5]
/ answers: 1 / hits: 58121
/ 8 Years ago, sat, september 17, 2016, 12:00:00
In JavaScript code, I have the following enum defined:
MyMessageIds = {
UndefinedId : 0,
FilenameId : 1,
BuildFileId : 2,
MovementArgsId : 3,
MoveId : 4,
ExecuteCommandId : 5
}
In a JavaScript function, I would like to be able to supply the string representation of an enum key (i.e. MoveId) and return its integer value of 4. So how could I do this?
More From » javascript