Examveda

What does the pop method do when called on an array in Ruby?

A. Removes the first element of the array

B. Removes the last element of the array

C. Returns a new array with the last element removed

D. Inserts an element at a specified index

Answer: Option B


Join The Discussion

Related Questions on Arrays, Hashes and Strings in Ruby