Check out example codes for "kotlin var init check". It will help you in understanding the concepts better.

Code Example 1

lateinit var file: File    

if (this::file.isInitialized) { ... }

Learn ReactJs, React Native from akashmittal.com