Skip to content
Quiz · Functions · lesson 8 of 10

Quiz — shadowing

What does the program print?

GO
package main

import "fmt"

func main() {
    x := 1
    if true {
        x := 2
        fmt.Print(x, " ")
    }
    fmt.Println(x)
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way