Q. What does the yield keyword do in Ruby?

  • (A) Executes the block passed to the method
  • (B) Returns the value of the block passed to the method
  • (C) Exits the method and returns to the caller
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) Executes the block passed to the method

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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