Ruby - Methods
Which of the following is the correct way to explicitly return the value 10 from a Ruby method?
return with or without parentheses, so return(10) is correct syntax.return10 lacks space (syntax error), return = 10 is invalid assignment, and return: 10 uses wrong colon syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions