(beta) Login local_offer
tags
mail
contact us

What is the output of the following Go code.

package main

import (  
    "fmt"
)

func hello() []string {  
    return nil
}

func main() {  
    h := hello
    if h == nil {
        fmt.Println("nil")
    } else {
        fmt.Println("not nil")
    }
}
programming-golang go golang quiz
Nov 11, 2019 14:02:46 UTC