switch case is ...

Swift โŸฉ Pattern Matching โŸฉ Sentence Patterns โŸฉ

๐Ÿ‘‰ ๆฏ”่ผƒ๏ผš if let ... as?, switch case let ... as

// switch on "protocol type"
switch medium {
  case is WebSite: // โญ๏ธ case is (without binding)
  default: // ...
}

Last updated