Groovy web console

subscribe to the feed Subscribe
to this
site

Default value + closure

Published 1 month ago by LoganMzz with tags default closure
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def demo(String version = "1.15", Closure body) {
    println "version=${version}"
    body()
}

demo() {
    println "toto"
}