Hi --
Hi,
Is there any convenient method to check if an array contains a particular element? eg.
abc = {'ele1','ele2'}
That's a hash, not an array. I think you mean:
["ele1", "ele2"]
if abc contains 'ele1'
if abc.include?('ele1')
David
Hi --
Hi,
Is there any convenient method to check if an array contains a particular element? eg.
abc = {'ele1','ele2'}
That's a hash, not an array. I think you mean:
["ele1", "ele2"]
if abc contains 'ele1'
if abc.include?('ele1')
David