Groovy web console

subscribe to the feed Subscribe
to this
site

any/else

Published 2 years ago by Valentin
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
items = ['foo', 'bar', 'baz', 'qux']
println(items.any { it == "baz" } ? 'found' : 'not found')
println(items.any { it == "fuzz" } ? 'found' : 'not found')