Beginner Ruby
Q21 / 100

How do you create a range from 1 to 5 (inclusive)?

Correct! Well done.

Incorrect.

The correct answer is B) 1..5

B

Correct Answer

1..5

Explanation

".." creates an inclusive range (1 to 5 includes 5), while "..." creates an exclusive range (excludes the last value).

Progress
21/100