+ 2

# Swift

let myPoint = (1, -1) switch myPoint { case let (x, y) where x == y: print("(\(x), \(y)) is on the line x == y") case let (x, y) where x == -y: print("(\(x), \(y)) is on the line x == -y") case let (x, y): print("(\(x), \(y)) is just some arbitrary point") } In this program what does \x and \y do or mean exactly . Pls reply fast i really am confused Thank you so much

14th Jul 2019, 2:42 PM
Svojas Pitale