Skip to content

Instantly share code, notes, and snippets.

@berkedel
Forked from dodyg/gist:5823756
Created April 7, 2016 13:54
Show Gist options
  • Save berkedel/d31ef0d6d28b643e61820dd29c44e58e to your computer and use it in GitHub Desktop.
Save berkedel/d31ef0d6d28b643e61820dd29c44e58e to your computer and use it in GitHub Desktop.
Kotlin Programming Language Cheat Sheet Part 3

#Control Structures

##If statement

Kotlin if statement should look familiar with other language

fun main(args : Array<String>) {
  val total = 10
  
  if (total > 5){
      println("$total is greater than 5") 
  }else if (total > 10){
      println("$total is greater than 10")
  }else{
      println("$total is less than 6")
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment