Creates a string from all the elements separated by the given separator.
Syntax
collection.joinToString(separator)Example
Enter values below to update the example in real time.
val→list→listOf→println→joinToString→apple→banana→cherry→val list = listOf("apple", "banana", "cherry")
println(list.joinToString(", ")) // apple, banana, cherry