what is unit type used for in kotlin
snippet in kotlin

what is unit type used for in kotlin

user5200

/* 
	Unit is used when the function basically return
    nothing of interest
*/

// Example
val MyName = "Johnny"

fun SayHey(): Unit {
	println("Hi, " + MyName)
}

fun main() {
	SayHey()
}