• +91 9723535972
  • info@interviewmaterial.com

Ruby Interview Questions and Answers

Question - Explain ampersand parameter (&block) in Ruby.

Answer -

The &block is a way to pass a reference (instead of a local variable) to the block to a method.

Here, block word after the & is just a name for the reference, any other name can be used instead of this.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners