Daily Archive: 2017-06-02

Kotlin Reference: Returns and Jumps

  Kotlin 有三种结构跳转表达式: return:默认返回最近一层的函数或匿名函数。 break:结束最近一层的循环。 continue:进行到最近一层循环的下一步。   这三个表达式都可以用在其他表达式中,如: [code lang=”kotlin”]val s = person.name ?: return[/code]   以上三个表达式的类型为 Nothing…
Read more