+ 1

This is my 2nd question from swift please help me

I FINALLY STARTED NEW LESSONS IN SWIFT BUT THERE IS THIS THING “WHERE” AND I’M CONFUSED WITH THIS CODE 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") } PlEASE HELP ME

12th Jun 2020, 2:26 PM
Coder
Coder - avatar
1 Answer
+ 1
thanks so much you are a life saver
12th Jun 2020, 4:58 PM
Coder
Coder - avatar