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

Code Example 1

val explicitDouble: Double = 70.0

Code Example 2

val age = 42

if (age < 10) {
    println("You're too young to watch this movie")
} else if (age < 13) {
    println("You can watch this movie with a parent")
} else {
    println("You can watch this movie")
}

Code Example 3

var myVariable = 42
myVariable = 50

val myConstant = 42

Code Example 4

val apples = 3
val oranges = 5
val fruitSummary = "I have ${apples + oranges} " +
                   "pieces of fruit."

Code Example 5

println("Hello, world!")

Code Example 6

const val SYSTEM_DEPRECATED: String = "System is deprecated"

Code Example 7

val label = "The width is "
val width = 94
val widthLabel = label + width
// The width is 94

Code Example 8

// if is an expression, so ternary operation not needed
val loaded = true
val status = if (loaded) "Ready" else "Loading..."
// "Ready

Learn ReactJs, React Native from akashmittal.com