Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

how to remove last element from array in ruby

prices = [10, 20, 30, 40]

prices.pop

puts prices
Output:

[10, 20, 30]
Source by reactgo.com #
 
PREVIOUS NEXT
Tagged: #remove #element #array #ruby
ADD COMMENT
Topic
Name
3+3 =