https://kotlinlang.org logo
#getting-started
Title
# getting-started
j

JungIn Choi

03/09/2021, 11:00 AM
Hi people, I’m glad there’s a community channel to ask a question :D I’m a super newbie for Kotlin (I installed IntelliJ yesterday🙄) I have basics in Java by the way I’m just curious why println does not work inside for loop. Is this intended or is it just a bug in this IntelliJ IDE?
Copy code
for ((index, element) in swarm.withIndex()){
     println("Fish at $index is $element")
 }
Fish at 0 is 12Fish at 1 is 5
👋 1
h

hho

03/09/2021, 11:10 AM
If you suspect your IDE might be faulty, you can always try your code on play.kotlinlang.org: https://pl.kotl.in/1ui3EYPD6
j

JungIn Choi

03/09/2021, 11:22 AM
Oh, thanks for nice tip @hho! This will reduce any other issues with IDE 😄 Thanks again for a kindly guide for a newbie.
j

Joris PZ

03/19/2021, 3:58 PM
Are you using the REPL? Might be you're running into this bug: https://youtrack.jetbrains.com/issue/KT-14979
j

JungIn Choi

03/19/2021, 4:39 PM
Ohh it's already reported bug then.. by the way I'm a super newbie so never heard of such website! Seems to be an official bug tracking website by InteliJ, I'll look onto it, thanks @Joris PZ!
2 Views