34,333
edits
Changes
→JavaScript ''switch'' Statements
== JavaScript ''switch'' Statements ==
''if ... else'' constructs work fine if you need to check a value against criteria (for example checking the value of a string against a couple of possible candidates as follows: