while and do loops are standard C-style loops:
var i = 1
while (i <= 10) {
println("i = $i")
i++
}
do {
i--
println("i = $i")
} while (i > 0)
Now that you have all the basic pieces you have everything that you need to read and understand the contents of this book.