DEV Community

Discussion on: Daily Challenge #194 - Spread Number

Collapse
 
eduardio profile image
Eduard Giménez

Ruby solution below. We could also return a Range directly, but here I'm being purist with the exercise.

def spreadNumber(n)
   Array(1..n)
end