Answers for "remove first element from array ruby"

0

ruby delete first element of array

a = [0,1,2,3]

a.drop(1)
# => [1, 2, 3] 

a
# => [0,1,2,3]
Posted by: Guest on March-14-2021
1

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
Posted by: Guest on January-20-2021

Code answers related to "remove first element from array ruby"

Browse Popular Code Answers by Language