1 posts in total

Array

Posts tagged

Keeping array elements uniq in Ruby

by Syed Aslam · 1 min read

With uniq method you can remove duplicates from an array, however using the bitwise | operator we can avoid adding duplicate items in the first place.