Groovy web console

subscribe to the feed Subscribe
to this
site
ab (via #groovywebconsole)
tweet this snippet Tweet
this
script

ab

Published 4 months ago by bb
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def set(k, v, flags =  [:]) {

    if (flags.key) {
        println ("hello world")
}
    println(flags.key)
}

set(1, 2, [key:""])
set(1, 2, [key:"abc"])