I’m getting a strange error: “syntax error, unexpected $end, expecting kEND” and it points to the final line of my code.
New to Ruby and not sure what I’m doing wrong here. Any help would be fantastic. Thanks!
def add(x,y)
if(x > y)
c = x + y
return c
else
puts "Y is too big"
return
end
a = 4
b = 6
add(a,b)
Corrected code (you are missing one end for the if-else):