Answers for "go Shorthand Declaration of Array in Golang"

Go
0

go Shorthand Declaration of Array in Golang

package main

import "fmt"

func main() {
    a := [5]int{18, 19, 21, 29, 46} // short hand declaration to create array
    fmt.Println(a)
}
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language