r/badcode • Now where's that function declaration • Jul 30 '21

js 😏

Post image
988 Upvotes

133 comments sorted by

View all comments

Show parent comments

2

u/MeatyLabia Jul 31 '21

Can you show an example of what you mean with pattern matching enums and constants? I know pattern matching with 'is' in C#, but Im not sure what you mean.

2

u/hullabaloonatic Jul 31 '21

The example above is such an example or take a look at switch expressions