0
点赞
收藏
分享

微信扫一扫

Kotlin 与 Scratch 的碰撞

朱小落 2022-06-09 阅读 42

1.创建 demo 工程:

Kotlin 与 Scratch 的碰撞_参考文档

Kotlin 与 Scratch 的碰撞_参考文档_02

Currently, scratches are supported only in Kotlin/JVM projects.

2.实际操作

Kotlin 与 Scratch 的碰撞_html_03

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​​


举报

相关推荐

0 条评论