Q. Which method returns the first element of an array in Ruby?

  • (A) first
  • (B) head
  • (C) start
  • (D) begin
πŸ’¬ Discuss
βœ… Correct Answer: (A) first
Explanation: The first method returns the first element of an array.
Explanation by: Rati Dubey
The first method returns the first element of an array.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
117
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
95%
Success Rate