πŸ“Š Ruby
Q. In Ruby, what is a closure?
  • (A) A function that accepts another function as an argument
  • (B) A function that returns another function
  • (C) A function that captures the state of its surrounding scope
  • (D) A function that is defined within another function
πŸ’¬ Discuss
βœ… Correct Answer: (C) A function that captures the state of its surrounding scope

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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