Tutorial by Examples

Let's take an scenario to understand advance function in better way, struct User { var name: String var age: Int var country: String? } //User's information let user1 = User(name: "John", age: 24, country: "USA") let user2 = User(name: "Chan", age...
To flatten multidimensional array into single dimension, flatMap advance functions is used. Other use case is to neglect nil value from array & mapping values. Let's check with example:- Suppose We have an multidimensional array of cities & we want to sorted city name list in ascending orde...

Page 1 of 1