
package Kotlin101.Loops

fun main(args : Array<String>) {
    var presidents = array("jfk", "nixon", "carter")

    print("I love these presidents ")
    for (p in presidents) {
        print ("$p,")
    }

    println("")
    print("I loath these presidents ")
    var loop = presidents.size
    while (loop > 0) {
        loop--
        print("${presidents[loop]}, ")
    }

    println("")
    print("I puzzle these presidents ")
    var pool = presidents.size
    do {
        pool--
        print("${presidents[pool]}, ")
    }while(pool > 0)
}


package Kotlin101.Loops

fun main(args : Array<String>) {
    var presidents = array("jfk", "nixon", "carter")

    print("I love these presidents ")
    for (p in presidents) {
        print ("$p, ")
    }

    println("")
    print("I voted for these presidents ")
    for (p in presidents.indices) {
        print ("${presidents[p]}, ")
    }

    println("")
    print("I loath these presidents ")
    var i = presidents.size
    while (i > 0) {
        i--
        print("${presidents[i]}, ")
    }

    println("")
    print("I puzzle these presidents ")
    var q = presidents.size
    do {
        q--
        print("${presidents[q]}, ")
    }while(q > 0)
}

Fix loop naming and for in indices
Fix loop naming and for in indices

dodyg/Kotlin101,mewebstudio/Kotlin101