No new line in repeat loop in Kotlin REPL in IntelliJ

Viewed 246

Whenever I use repeat loop in Kotlin in IntelliJ in Kotlin REPL, there is no new line after one iteration, even for the println statement.

repeat(2) {
    println("A fish is swimming")
}

Output:

A fish is swimmingA fish is swimming

But this is not the case in Kotlin Playground:

Output in Kotlin Playground:

A fish is swimming
A fish is swimming

Why are the outputs different? I could not find the answer anywhere.

1 Answers
Related