Last updated 3 years ago
Was this helpful?
โฉ โฉ โฉ
๐ ๆฏ่ผ๏ผ if let ... as?, switch case let ... as
// switch on "protocol type" switch medium { case is WebSite: // โญ๏ธ case is (without binding) default: // ... }
AliSoftware โฉ Pattern Matching
โญ๏ธ
if let ... as? - use as?.
as?
switch case let ... as - optional binding.