Changes

JavaScript Flow Control and Looping

528 bytes added, 14:33, 24 April 2007
no edit summary
<pre>
switch (''value'') case : "''match1''" ''statements'' break;  case : "''match2''" ''statements'' break;  case : "''match3''" ''statements'' break;  case : "''match4''" ''statements'' break;  case : "''match5''" break;  default : ''statements'' break;</pre> There can be any number of ''case'' statements - basically as many as you need to fully compare the ''value'' against the possible options (represents by ''match1'' through to ''match5'').