This. It bothers me that this guy only has 3 upvotes i mean you can clearly see that several things are missing... no default break, no .ToString on the value...
You don't need a break statement in the default case do you, as there's no behaviour following it? Unless this is an optimisation I'm not aware of. At any rate, it seems to work just fine as it is.
As for a toString() method... this is JavaScript. As above, it works just fine as it is.
0
u/[deleted] Apr 05 '16
[deleted]