'switch' operator improvement

Eugen.Konkov at aldec.com Eugen.Konkov at aldec.com
Tue Oct 16 05:37:23 PDT 2007


allow RegEx in case

var str= 'a';
switch( str ) {
  case /a/:
    alert('a');
    break;

  case /b/:
    alert('b');
    break;
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20071016/52206ac1/attachment-0002.html 


More information about the Es4-discuss mailing list