Check out example codes for "random string generator kotlin". It will help you in understanding the concepts better.

Code Example 1

private fun randomID(): String = List(16) {
  (('a'..'z') + ('A'..'Z') + ('0'..'9')).random()
}.joinToString("")

Learn ReactJs, React Native from akashmittal.com