Beginner Go (Golang)
Q30 / 100

What is a type switch?

Correct! Well done.

Incorrect.

The correct answer is B) A switch statement that matches on the dynamic type of an interface value

B

Correct Answer

A switch statement that matches on the dynamic type of an interface value

Explanation

switch v := i.(type) { case int: ... case string: ... } matches the runtime type of i.

Progress
30/100