kotlin nothing vs unit code example
Example: what is unit type used for in kotlin
/*
Unit is used when the function basically return
nothing of interest
*/
// Example
val MyName = "Johnny"
fun SayHey(): Unit {
println("Hi, " + MyName)
}
fun main() {
SayHey()
}