Re:Using Dispatch Tables to Avoid Conditionals in JavaScript
by Leszek on Monday May 13, 2013 @02:00PM
(#5700268)
I don't know, in this case, with a bit of reformatting the switch can look pretty similar:
Although that's to be expected, a switch on a string value isn't that much different to a string lookup in an associative array.
[ Parent
| on HN ]