Vidyalelo
Ruby Programming · Q27

Arrays, Hashes and Strings in Ruby

Programming · Ruby Programming · question 27

Q27

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
Answer
C.
Returns a new array with the last element removed
D.
Inserts an element at a specified index

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board