[Swift] Loop
For loop for var i = 0; i < 10; i+=1 { print(i) } // error // C-style for statement has been removed in Swift 3 ```swift for i in 0..<10 { pri...
For loop for var i = 0; i < 10; i+=1 { print(i) } // error // C-style for statement has been removed in Swift 3 ```swift for i in 0..<10 { pri...
If var x = 10 if x > 5 { print("greater than 5") } If -else var x = 2 if x % 2 == 0 { print("even number") } else { print("odd number") }
Upcasting (as) Child instance as parent class Safe casting
Int 10 Int Store Int-type values
var Values assigned to variables can be changed var myVar = 10 // :Int var x = 0.0, y = 0.0, z = 0.0