We can create "Enums" in Javascript as follows:
var MyEnum = {
A: 0,
B: 1,
}
Can I use empty objects instead of numbers as follows?
var MyEnum = {
A: {},
B: {},
}
What's the difference and which should be used? There isn't any specific use case.