Mobile App Development - Kotlin

Back to Course

Lesson Description

Lession - #400 Kotlin While

do-while or while loop is a control flow statement which executes a block of code at least once without checking the condition , and afterward over and over(repeatedly>
executes the block, or not, it absolutely depends on a Boolean condition at the end of do-while block.

Let's see an example

fun main(>
{ var i = 0 while (i < 5>
{ println(i>
i++ } }


Try it here