Xavi is creating a new lineup!

Report a typo

World-class football player Xavi Hernández has been selected as the 🔵🔴 🔵F.C. Barcelona 🔵🔴 🔵new manager. Upon arrival, one of the first changes he implemented was rearranging Barça's starting lineup.

Since Xavi uses the 3-4-3 or 4-3-3 formations to properly implement the tiki-taka football gameplay, can you help him create and return a map called offense within the function barcaOffense, that contains the 3 offense players' names as the key and their jersey number as its value?

The names of the offense players and their jersey numbers are the following:

Barcelona offense lineup
Name Number
Ansu Fati 10
Memphis 9
Dembele 7

Sample Input 1:

Sample Output 1:

map[Ansu Fati:10 Dembele:7 Memphis:9]
Write a program in Go
package main

import (
"fmt"
)

func barcaOffense() map[string]int {
offense := ? // create the map with the key/value pairs here

return ? // return the map here
}

// DO NOT delete or modify the contents of the main function!
func main() {
fmt.Println(barcaOffense())
}
___

Create a free account to access the full topic