Which code snippet correctly shows a for loop using a range to display "1 2 3 4 5 6"?
A. for(z in 1..7) println("$z ")
B. for(z in 1..6) print("$z ")
C. for(z in 1 to 6) print("$z ")
D. for(z in 1..7) print("$z ")
Answer: Option B
Related Questions on Kotlin Program
A. A new version of Java.
B. A JavaScript framework.
C. A statically-typed programming language for the JVM, Android, and browser.
D. A database management system.
Which platform does Kotlin primarily target?
A. Python Bytecode
B. JavaScript
C. JVM (Java Virtual Machine) Bytecode
D. PHP

Join The Discussion