Groovy web console

subscribe to the feed Subscribe
to this
site

Check if list contains a value

Published 4 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
list = [11, 22, 33]

x = 33
println list.contains(x)

x = 99
println list.contains(x)