Check out example codes for "how to get char input in kotlin". It will help you in understanding the concepts better.

Code Example 1

readLine()!!.toInt()

Code Example 2

import java.util.Scanner

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val chr = scanner.next().single()
}

Learn ReactJs, React Native from akashmittal.com