Swift Tutorial - Tutorialspoint

(backadmin) #1

Flow Diagram


Example


import Cocoa

var someInts:[Int] = [ 10 , 20 , 30 ]

for var index = 0 ; index < 3 ; ++index {
println( "Value of someInts[\(index)] is \(someInts[index])")
}

When the above code is executed, it produces the following result:


Value of someInts[0] is 10
Value of someInts[1] is 20
Value of someInts[2] is 30
Free download pdf