Verification code

Report a typo

You are working on sign up page and want to send email to user to check their email and finally decided to verify them using verification code. Now implement the logic for creating random code. The verification code length should be 10.

Write a program in Kotlin
fun verificationCode(): String {
// use these letters to create the code
val letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"

// complete the function and then return the code
}
___

Create a free account to access the full topic