This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
| --- | |
| layout: default | |
| title: Archive | |
| --- | |
| <div class="post"> | |
| <h2>Archive</h2> | |
| <ul> | |
| {% for post in site.posts %} | |
| {% unless post.next %} |
| function range(start, finish, step = 1) { | |
| if (step < 1) throw "Step must be ge 1" | |
| return { | |
| [Symbol.iterator]: function* () { | |
| let count = 1; | |
| yield start | |
| if (start !== finish) { | |
| let tmp = start; | |
| if (start < finish) { | |
| while (tmp < finish) { |