Check out example codes for "Kotlin singleton". It will help you in understanding the concepts better.

Code Example 1

object MySingleton {
    fun myMethod(): Int {
        return 5
    }
}

MySingleton.myMethod() // 5

Learn ReactJs, React Native from akashmittal.com