11.5 Experimenting with Kotlin
When learning a new programming language, it is often useful to be able to enter and execute snippets of code. One of the best ways to do this with Kotlin is to use the Kotlin Playground (Figure 11-1) located at https://play.kotlinlang.org:
Figure 11-1
In addition to providing an environment in which Kotlin code may be quickly entered and executed, the playground also includes a set of examples and tutorials demonstrating key Kotlin features in action.
Try out some Kotlin code by opening a browser window, navigating to the playground and entering the following into the main code panel:
fun main(args: Array<String>) {
println("Welcome to Kotlin")
for (i in 1..8) {
println("i = $i")
}
}
After entering the code, click on the Run button and note...