Tuesday, 20 August 2013

JSON like syntax vs switch statement javascript

JSON like syntax vs switch statement javascript

I saw a post on
http://www.jquery4u.com/javascript/shorthand-javascript-techniques/ where
he talks about an alternative way to using switch statements.
I have created a snippet below, but I'm not sure why the alternate is 99%
slow.
http://jsperf.com/alternateswitch
Any idea?
Arun

No comments:

Post a Comment