I have two arrays which are not ordered and may be of different lengths, I want to create a new array that contains only the common elements. I need a function like
newArray = commonElements(Array1, Array2) in LotusScript. 

Looked around to see if there was a code example but could not find one. Have been sort of able to create this but with a lot more looping than I think should be necessary. 

can you point me to a solution?