Groovy web console

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

a

Published 1 month ago by a with tags a
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts

a=['mtg', 'ng' ]

b='mtg'

if (b in a) {
  print 1
}

if (b in ['1','2','3']) {
  print 2
}