Declaring a concatenated string

Report a typo

What will be the output of the code below?

package main

import "fmt"

func main() {
    var greeting = "hello"

    // Are we allowed to concatenate strings in variable declarations?
    var helloWorld = greeting + " " + "World"
    helloWorld += "!"

    fmt.Println(helloWorld)
}
Select one option from the list
___

Create a free account to access the full topic