Latest iOS Interview Questions
Write a closure that accepts string and return length of string(which is integer) :
let simpleClosure:(String) -> (Int) = { name in
return name.count
}
let result = simpleClosure("Hello World")
print(result)
Thanks
No comments:
Post a Comment
Thanks