You are currently viewing Noob questions 2

Noob questions 2

Hello guys its me again! I have a problem with for loop, im trying to create a for loop when the number reaches the end, i want it to start another for loop, the problem is that the results gets messy, i want the second for loop to start at the end, not in tye middle

This is the code:

fun main(args: Array<String>) { for (item in 1..5){ println("thanks") if (item==3){ for (item in 1..5){ println("hello") } } } }

submitted by /u/BOOMBATX2
[link] [comments]