Higher order function or higher level function can have another function as a parameter or return a function or can do both. Till now we… [Read More]
Kotlin Lambda Function with example
Lambda function is also known as anonymous function because it has no name. Parameters are in the left side of the arrow and actual code… [Read More]
Kotlin Default and Named Argument
In this guide, we will learn default and named argument that are used in Kotlin functions. Kotlin Default Argument We have already learned how a… [Read More]
Kotlin Recursion and Tail Recursion with examples
A function is called recursive function if it calls itself and this process is called recursion. How a recursive function looks like? Here the function… [Read More]
Kotlin Function with examples
A function is a block of related statements that together perform a specific task. For example lets say we have to write three lines of… [Read More]
Kotlin break Statement with examples
The break statement is used to terminate the loop immediately without evaluating the loop condition. As soon as the break statement is encountered inside a… [Read More]
Kotlin continue Expression with examples
The continue construct skips the current iteration of the loop and jumps the control to end of the loop for the next iteration. The continue… [Read More]
Kotlin do-while Loop with examples
A do-while loop is similar to while loop except that it checks the condition at the end of iteration. A do-while loop will at least… [Read More]
Kotlin while Loop with examples
While loop is used to iterate a block of code repeatedly as long as the given condition returns true. In this guide, we will learn… [Read More]
Kotlin for Loop with examples
The for loop in Kotlin is used to iterate or cycle though the elements of array, ranges, collections etc. In this guide, we will learn… [Read More]
Kotlin When Expression with examples
The when expression in Kotlin works same as switch case in other programming languages such as C, C++ and Java. Kotlin when expression simple example… [Read More]
Kotlin Ranges
In this guide, we will discuss the very cool feature of Kotlin which is ranges. With the help of ranges in Kotlin we can easily… [Read More]
Kotlin Array
Arrays in Kotlin are able to store multiple values of different data types. Of course if we want we can restrict the arrays to hold… [Read More]
Kotlin String
String is a sequence of characters. In this guide, we will see how to declare, use and manipulate strings in Kotlin. Declare a String in… [Read More]
Kotlin If – Else Expression with examples
In any programming language, we need control statements to control the flow of the program based on the output of a condition. For example, if… [Read More]