isNotEmpty
Returns true if the array is not empty.
inline fun <T> Array<out T>.isNotEmpty(): Boolean(source)
val numbers = arrayOf(1, 2, 3)
if (numbers.isNotEmpty()) {
println("The array has ${numbers.size} elements.")
} else {
println("The array is empty.")
}