DEV Community

Discussion on: First Half. Ruby noob question

Collapse
 
djuber profile image
Daniel Uber

That's also just about what I would write for my own use, possibly putting the limit = 1 + array.length/2 on a separate line, then returning array[0..limit], to reduce the amount of things happening at a time.