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.
1 posts in total
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.