I have the following ENUM in my Javascript:
var letters = { "A": 1, "B": 2, "C": 3.....}
And to use this I know use:
letters.A
But I was wondering if there was a way that i could replace A with a variable. I have tried something like
var input = "B"; letters.input;
but this does not work.
Any suggestions?
Thanks
letters.input
to mean something when you never definedletters.input
in the first place?