Created
November 27, 2023 11:23
-
-
Save lalizita/74f8a1afdffc18e44c8bd271b51b7cc8 to your computer and use it in GitHub Desktop.
Maps example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
var jogo = map[string]int{"Lais": 10, "Asael": 20} | |
fmt.Println(jogo) | |
// Atualiza item | |
jogo["Lais"] = 50 | |
fmt.Println(jogo) | |
// Remove item | |
delete(jogo, "Lais") | |
fmt.Println(jogo) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment