Groovy web console

subscribe to the feed Subscribe
to this
site

GOTO fun

Published 2 weeks ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def x = 10;
def y = false
def z = 0

label1:
print "Hello "
if (--x > 0) {
    continue label2
}

label2:
println "World"
if (y) {
    y = true
    continue label3
}

label3:
print ""
if (++z < x) {
    y = false
    continue label1
}

println "FIN"