remove item from array ruby code example
Example 1: ruby remove element from array by value
a = [3, 2, 4, 6, 3, 8]
a.delete(3)
Example 2: ruby array remove by index
a= [1,1,1,2,2,3]
delete_list = [1,3]
delete_list.each do |del|
a.delete_at(a.index(del))
end