Is there a way in Javascript to compare one integer with another through switch case structures without using if statements?
E.g.
switch(integer) {
Posting for "cool" syntax :P
if( integer in range(0, 10 ) ) { } else if ( integer in range( 11, 20 ) ) { } else if ( integer in range( 21, 30 ) ) { } function range( min, max ){ var o = {}, i ; for( i = min; i <= max; ++i ) { o[i] = !0; } return o; }