I need to emulate enum type in Javascript and approach seems pretty straight forward:
var MyEnum = {Left = 1; Right = 2; Top = 4; Bottom = 8}
Now, in C# I could combine those values like this:
MyEnum left_right = MyEnum.Left | MyEnum.Right
and then I can test if enum has certain value:
if (left_right && MyEnum.Left == MyEnum.Left) {...}
Can I do something like that in Javascript?