Wednesday
Aug222007
How to deal with switch statements
Wednesday, August 22, 2007 Java can only do switch statements based on integer types. JavaScript on the other hand, can switch on any type, and any mixture of types. So each case statement could be a different type. Since this semantic is not mimicked in Java, we have to convert JavaScript switch statements to Java if/else statements.
tagged
JavaScript
JavaScript 
Reader Comments