javascript switch using intervals

Posted by Fernando SBS on Stack Overflow See other posts from Stack Overflow or by Fernando SBS
Published on 2010-06-08T00:49:36Z Indexed on 2010/06/08 1:02 UTC
Read the original article Hit count: 237

Filed under:
|
|

Can I use intervals in a switch statement?

Like

switch (parseInt(troops[i])) {
                case <10:
                    editbox.style.fontSize = "13px";
                    break;
                case <100:
                    editbox.style.fontSize = "12px";
                    break;
                case <1000:
                    editbox.style.fontSize = "8px";
                    editbox.size = 3;
                    //editbox.style.width = "18px";
                    break;
                default:
                    editbox.style.fontSize = "10px";
            }

???

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about switch