Session 4 Swift IOS Code

   IOS Mobile Application Development        

Session 4 Swift IOS Code

----Loops with example

var arr = ["Ali","Kumar","Aslam","Adam","EVE"]

for i in arr
{
    print("Fahad Hussain \(i)")
}

var a = 1
var f = 10

while a <= f
{
    print(a)
    a += 1;
}

repeat
{
    print(a)
    a += 1;
} while ( a <= f)

No comments:

Post a Comment

Fell free to write your query in comment. Your Comments will be fully encouraged.