Implementing sets!

Report a typo

Select all the code snippets below that properly implement the fastFood map as a set declaration.

a)

fastFood := map[string]bool{
    "🍔": true,
    "🍟": true,
    "🥤": true,
}

b)

fastFood := map[string]string{
    "🍔": "true",
    "🍟": "true",
    "🥤": "true",
}

c)

fastFood := map[string]float64{
    "🍔": 2.99
    "🍟": 1.99
    "🥤": 1.49
}

d)

fastFood := map[string]struct{}{
    "🍔": struct{}{},
    "🍟": struct{}{},
    "🥤": struct{}{},
}
Select one or more options from the list
___

Create a free account to access the full topic