mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
13 lines
148 B
V
13 lines
148 B
V
fn fn_with_if_else() {
|
|
if true {
|
|
a = 10
|
|
a++
|
|
} else {
|
|
println('false')
|
|
}
|
|
}
|
|
|
|
fn fn_with_if_else_oneline() {
|
|
_ := if true { 1 } else { 2 }
|
|
}
|