Ruby Developer Question:
Tell me how can you declare a block in Ruby?
Answer:
In Ruby, the code in the block is always enclosed within braces ({}). You can invoke a block by using “yield statement”.
Previous Question | Next Question |
Do you know about Dig, Float and Max? | Tell us what is class libraries in Ruby? |