Ruby - Blocks, Procs, and Lambdas
What will be printed when this Ruby code runs?
def call_twice
yield
yield
end
call_twice { puts 'Hello' }def call_twice
yield
yield
end
call_twice { puts 'Hello' }call_twice calls yield two times.yield is called.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions