+ 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
1 Answer
+ 3
\(x) and \(y) allow you to insert the value of x and y into a string.