Check out example codes for "return type in kotlin function". It will help you in understanding the concepts better.

Code Example 1

//Function having two Int parameters with Int return type
fun sum(a: Int, b: Int): Int {
    return a + b
}

Learn ReactJs, React Native from akashmittal.com