Map

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" "reflect" ) func main() { // numberMap := make(map[string]int) // numberMap["satu"]=1 // numberMap["dua"]=2 // numberMap["tiga"]=3 // ** Delete list map // delete(numberMap, "dua") // ** Detect key exist or not // var _, exist = numberMap["dua"] // ** Slice with Map chicken := []map[string]string{ {"satu":"ayam goreng","dua":"es teh"}, {"satu":"ayam bakar","dua":"es jeruk"}, } fmt.Println("Coba Map | ", reflect.TypeOf(chicken)," => ", chicken[1]["satu"]) }
Editor Settings
Theme
Key bindings
Full width
Lines