Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if num == .One || num == .Two || num == .Three || num == .Four {
- //code
- }
- switch num {
- case .One, .Two. Three, .Four:
- //code
- default:
- print("do nothing but I still need to put something here")
- }
- if case .One, .Two, .Three, .Four == num {
- //code
- }
- If [.One, .Two, .Three, .Four].contains(num) {
- enum Number {
- case One, Two, Three, Four
- }
- switch num {
- case .One, .Two, Three, .Four:
- /* do something*/
- break
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement