Javascript switch vs. if...else if...else

Posted by John Hartsock on Stack Overflow See other posts from Stack Overflow or by John Hartsock
Published on 2010-05-27T16:30:55Z Indexed on 2010/05/27 16:31 UTC
Read the original article Hit count: 116

Guys I have a couple of questions:

  1. Is there a preformance difference in Javascript between a switch statement and an if...else if....else?
  2. If so why?
  3. Is the behavior of switch and if...else if...else different across browsers? (FireFox, IE, Chrome, Opera, Safari)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about cross-browser