while loop in Kotlin
-------------------------------------------------------------------------------------------------------------------------------
(while) -----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
"same as in java"
# var colorarray = arrayOf("Red","Green","Blue","Yellow")
# var i=0
# while (i < colorarray.size){
# println("Counter $i :: ${colorarray[i]}")
# i++
# }
-------------------------------------------------------------------------------------------------------------------------------
(do while) --------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
"same as in java"
# var colorarray = arrayOf("Red","Green","Blue","Yellow")
# var j=0
# do {
# println("Counter $j :: ${colorarray[j]}")
# j++
# }while (j < colorarray.size)