re: How do you do random? VIEW POST

FULL DISCUSSION
 

In kotlin

Random.nextInt(0..10)

Or

Random.nextInt(from = 0, until = 11)

Thanks to the Random api in the stdlib this works in the JVM, Kotlin.js and Kotlin native

code of conduct - report abuse