Ruby - Error Handling
What will be the output of this Ruby code?
begin puts 10 / 0 rescue ZeroDivisionError puts "Cannot divide by zero" end
begin puts 10 / 0 rescue ZeroDivisionError puts "Cannot divide by zero" end
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions