Skip to content
Quiz · Conditions · lesson 3 of 7

Quiz — a variable from if

What happens when this program is built and run?

GO
package main

import "fmt"

func main() {
    if v := 10; v > 5 {
        v++
    }
    fmt.Println(v)
}

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