lets say i have an enum in javascript defined like this:
const myEnum = {
A:'a',
B:'b',
C:'c',
D:'d'
};
I have a character and I need to check whether it is present in the enum or not.
currently, I'm doing something like
if(value !== myEnum.A || value !==myEnum.B || ......) {
//FAILURE
}
this is something of a problem how do I make it something like:
if(value not in myEnum.values){
//FAILURE
}