Blocks in Ruby (like anonymous functions in JavaScript) do not require a name to operate.
There are a few differences between blocks and methods in Ruby. While methods can run more than once, a block only runs once.
Blocks in Ruby (like anonymous functions in JavaScript) do not require a name to operate.
There are a few differences between blocks and methods in Ruby. While methods can run more than once, a block only runs once.
Top comments (0)