Groovy web console

subscribe to the feed Subscribe
to this
site

optional args

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
void foo(Map args = [:]) {
  String bar = args.bar ?: 'bar'

  println bar
}

foo()
foo(bar: 'BAR')