switch

The switch statement first evaluates the expression that follows the switch keyword and then evaluates
the case expressions, in the order in which they appear, until it finds a value that matches.
  • The
  • matching case is determined using the === identity operator, not the == equality operator, so the
    expressions must match without any type conversion.

    你可能感兴趣的:(switch)