In this post, we will learn how to use the max() function with different examples. We will use it to find the maximum of n different values.
ReadIn this post, we will learn how to use the min() function with different examples. We will use it to find the minimum of n different values.
ReadThree different ways in swift to find the smallest of three numbers. We will learn how to find the smallest value by using a separate function and by using min function
ReadThree different ways in swift to find the largest of three numbers. We will learn how to find the largest value by using a separate function and by using max function
ReadSwift program to convert a string to float and double. We can use floatValue, Float constructor, doubleValue or Double constructor to convert a string to float or double in swift.
ReadSwift program to return multiple values from a function. We can return multiple normal values or multiple optional values from a function.
ReadSwift program to insert characters to a string. This post will show you how to insert single or multiple characters to a swift string.
ReadSwift program to find the first and last character of a string in swift in two different ways. We can use first, last properties or startIndex, endIndex to find the first and last character of a swift string.
ReadSwift program to find the maximum or largest element in an array. We can use max or max(by) to find the largest array value. In this post, I will show you how to use max and max(by) with examples.
ReadSwift program to convert a string to date. We can use a DateFormatter class to convert a valid string to a Date object in Swift. We can use define different formats in the DateFormatter class.
Read