也有英文版文章
Also this tutorial has been written in English
Check out my Medium
let a = 2;
match a {
1 => println!("一"),
2 => println!("二"),
3 => println!("三"),
4 => println!("四"),
5 => println!("五"),
_ => println!("其他"),
}
Boolean Match
Number Match
未來認識更多語法後,會再回頭補充更多Match用法。
So far, so good.