Why implicit return?


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-Zjd2y/0/4?curriculum_id=5059f8619189a5000201fbcb


I got the code to work for The Refactor Factory 4. However, I don't understand the point of implicit return (even after google and reading what people have to say about it). Some say it's performance, others say the performance difference is minimal. Some say it's cleaner, others that it's harder to read. I still don't understand how exactly we should use the implicit return: should I really just type the variable name of the variable I want to return at the end of the function every time?


Replace this line with your code.


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.