Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, January 17, 2013

Codecademy Sample Solution: Passing Your Proc to a Method



ages = [23, 101, 7, 104, 11, 94, 100, 121, 101, 70, 44]

# Add your code below!

under_100 = Proc.new {|num| num < 100}

youngsters = ages.select(&under_100)

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts