I have an array of elements in Ruby
[2,4,6,3,8]
I need to remove elements with value 3 for example
3
How do I do that?
I think I've figured it out:
a = [3, 2, 4, 6, 3, 8] a.delete(3) #=> 3 a #=> [2, 4, 6, 8]
1.4m articles
1.4m replys
5 comments
57.0k users