Swift - Data Types
Find the mistake in this code snippet:
typealias Coordinates = (x: Int, y: Int) let point: Coordinates = (x: 10, y: "20")
typealias Coordinates = (x: Int, y: Int) let point: Coordinates = (x: 10, y: "20")
Coordinates expects x and y as Int values.y is a String "20", which mismatches the expected Int type.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions