Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (B) Adds an element to the end of the array

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
198
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate