Kotlin 与 Scratch 的碰撞
2019-05-14 本文已影响34人
光剑书架上的书
1.创建 demo 工程:


Currently, scratches are supported only in Kotlin/JVM projects.
2.实际操作

val s = "Hello"
val t = "Kotlin"
val st = "$s$t"
println(st)
val a = 1
val b = 2
val c = a + b
println(c)
var sum = 0
for (i in 0..100)
sum += i
println(sum)
for(i in 0..9)
println(i)
参考文档:
https://kotlinlang.org/docs/tutorials/quick-run.html#using-scratches