πŸ“Š Ruby
Q. How do you pass a proc as an argument to a method in Ruby?
  • (A) By prefixing the proc variable with a hash #
  • (B) By using the pass_proc method
  • (C) By prefixing the proc variable with an ampersand &
  • (D) By enclosing the proc variable in parentheses ()
πŸ’¬ Discuss
βœ… Correct Answer: (C) By prefixing the proc variable with an ampersand &

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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