Kotlin Beginner - Random Element from Array
Hello all! I'm completely new to coding, but it's something I have been meaning to learn for some time. Starting with Kotlin because I'm interested in Android development - I hear a lot of good things about the language in comparison to Java, and the syntax certainly seems easier for beginners. I'm really enjoying the course here on SoloLearn! I've been playing with arrays recently - I have managed to write the attached, which returns an element from an array based on user input. What I would like to do is generate a random number within a range, which I think would allow me to display a random element from the array. Is anyone able to point me in the right direction here? (P.S. Feedback is very welcome if I have done anything wrong!) https://code.sololearn.com/cSU9aPws1LRE/?ref=app