I have the following ENUM in my Javascript:
var letters = { "A": 1, "B": 2, "C": 3.....}
And to use this, I know:
letters.A
But I was wondering if there is a way to replace A with a variable. I tried something like
var input = "B";
letters.input;
but it does not work.
Any suggestions?
thank
source
share