Let's find out the result of the Code

Report a typo

What will be the result of the following code:

Please, enter the output of the code in the answer box below

var number interface{} = 2022
switch number.(type) {
case nil:
   fmt.Println("number is a nil type")
case int:
   fmt.Print("number is an int type")
case string:
   fmt.Println("number is a string type")
default:
   fmt.Println("type is not defined")
}
Enter a short text
___

Create a free account to access the full topic