A

Admin • 833K Points
Coach

Q. Which method removes the last element from an array in Ruby?

  • (A) pop
  • (B) push
  • (C) shift
  • (D) unshift
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Ruby
  • Hashtags:

Explanation by: Admin

The pop method removes and returns the last element of an array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.