If a type switch statement has no type matching the value's type, the _______ case is executed.

  • type
  • switch
  • case
  • default
If a type switch statement in Go has no type matching the value's type, the default case is executed. The default case is optional and is used to handle any unmatched types. It provides a fallback option when none of the specified type cases match the type of the value being evaluated.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *