Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyProc vs lambda usageSingle-choice MCQ

What does this code print, given how Proc and lambda treat the `return` keyword?

def run p = proc { return 10 } p.call 20 end def run_lambda l = lambda { return 10 } l.call 20 end puts run puts run_lambda