Beginner Ruby
Q33 / 100

What is a "block" in Ruby?

Correct! Well done.

Incorrect.

The correct answer is B) A chunk of code enclosed in do...end or {} that can be passed to methods

B

Correct Answer

A chunk of code enclosed in do...end or {} that can be passed to methods

Explanation

Blocks are anonymous pieces of code passed to methods, commonly used with iterators like each, map, and select.

Progress
33/100