The switch directive should be capable of more feature the just matching numbers and strings.
Possibilities include checking an interval and checking a type
switch (x) {
case (value) {
// run if the value of x is "value". "value" does not need to be a constant
}
case in ( interval ) {
// run if interval contains x
}
case is String {
// run if x is a String
}
}
The switch directive should be capable of more feature the just matching numbers and strings.
Possibilities include checking an interval and checking a type