From 548f756be52ed4176e1079e789c04d45aa619a0d Mon Sep 17 00:00:00 2001 From: lama Date: Tue, 8 Mar 2022 17:11:26 +0300 Subject: [PATCH] Lama-alhaysuni --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index debb56b..0cb8cbc 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,27 @@ Create a function that receives an array of items & arrays and returns one flatt | 3 | [[null, 3], [2, 4, 5, null], 0, 8, 3] | [3, 2, 4, 5, 0, 8, 3] | | 4 | [3, 5, [5, 9, 0]] | [3, 5, 5, 9, 0] | +answer + +import UIKit + +//var greeting = "Hello, playground" + + +func getn(array: Int){ + var list = [1,2,nil,6,5,nil] + for list in list{ + if list == nil { + print(list) + } + } +} + + + + + + ## 4th Challenge Create a function that receives a string that contains combination of parentheses, square brackets, and curly braces. Then, it returns true if every opening bracket has a closing pair.