Ruby - Methods
Identify the error in this Ruby method:
def add(a, b) return a + b return end
def add(a, b) return a + b return end
return a + b exits the method immediately.return is never reached, so it is unreachable code but not a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions