Examveda

What does the '<<' operator do when used with arrays in Ruby?

A. Adds an element to the beginning of the array

B. Adds an element to the end of the array

C. Removes the last element from the array

D. Concatenates two arrays

Answer: Option B


Join The Discussion

Related Questions on Arrays, Hashes and Strings in Ruby