Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

D31_eslint 與 LIOJ 的愛恨情仇 + 開始第四週

D31_eslint 與 LIOJ 的愛恨情仇 + 開始第四週

基礎電腦科學:演算法概要

基礎電腦科學:演算法概要

What is the concept of handle in Java?

What is the concept of handle in Java?






留言討論