def arrayOne = ['a', 'b']; def arrayTwo = ['c', '', 'd'] (arrayOne + arrayTwo).join(',') println arrayOne.indexOf("b") arrayOne.eachWithIndex { name, index, indexPlusOne = index + 1 -> println "Name $name has position $indexPlusOne" }