1.创建 demo 工程:
Currently, scratches are supported only in Kotlin/JVM projects.
2.实际操作
代码语言:javascript复制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