how to change value of each element in charArray kotlin code example Example: kotlin chararray to string val result: String = chars.joinToString("");