diff --git a/challeng.playground/Contents.swift b/challeng.playground/Contents.swift new file mode 100644 index 0000000..b20a582 --- /dev/null +++ b/challeng.playground/Contents.swift @@ -0,0 +1,57 @@ +import UIKit + +var greeting = "Hello, playground" + +var array1 = [2,4,6,4,9,6,2] +var array2 = [1,1,2] +var array3 = [2,2,1] + + + for x in array1 { + if x == 9 { + print(x) + }} + + for y in array2 { + if y == 2 { + print(y) + } + } + for z in array3 { + if z == 1 { + print(z) + + } + } + +//__________________________________________ + +var arr1 :[Any] = [1,[2,3,nil,4],[nil],5] +var arr2 : [Any] = [7, 0,[nil],[nil, nil, 9]] +var arr3 : [Any] = [[nil, 3], [2, 4, 5, nil], 0, 8, 3] +var arr4 : [Any] = [3, 5, [5, 9, 0]] + +for x in arr1 { + if x != nil { + print(x) + } +} + + for x in arr2 { + if x != nil { + print(x) + } +} + +for x in arr3 { + if x != nil { + print(x) + } +} + +for x in arr4 { + if x != nil { + print(x) + } +} + diff --git a/challeng.playground/contents.xcplayground b/challeng.playground/contents.xcplayground new file mode 100644 index 0000000..cf026f2 --- /dev/null +++ b/challeng.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/challeng.playground/playground.xcworkspace/contents.xcworkspacedata b/challeng.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ca3329e --- /dev/null +++ b/challeng.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/challeng.playground/playground.xcworkspace/xcuserdata/ralthebailah.xcuserdatad/UserInterfaceState.xcuserstate b/challeng.playground/playground.xcworkspace/xcuserdata/ralthebailah.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..8d14d87 Binary files /dev/null and b/challeng.playground/playground.xcworkspace/xcuserdata/ralthebailah.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/challeng.playground/timeline.xctimeline b/challeng.playground/timeline.xctimeline new file mode 100644 index 0000000..b8a6802 --- /dev/null +++ b/challeng.playground/timeline.xctimeline @@ -0,0 +1,11 @@ + + + + + + +