TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
10.13k stars 13.58k forks source link

Ruby_Basic Data Types:Add a link about methods return values #29014

Closed youssef-el-atmani closed 3 weeks ago

youssef-el-atmani commented 4 weeks ago

When I finished the ruby_basics exercise, I looked at the solutions and noticed that the functions (or methods) didn’t have a return statement. I found this odd, which led me to the article I’ve linked, which explains that Ruby methods don’t require an explicit return statement.

Because

For those that just finished the Foundations course, and came from JS, they will find it a bit odd that Ruby methods does not require an explicit return statement. The article linked in the assignment briefly and clearly explains that little mystery

This PR

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

KevinMulhern commented 3 weeks ago

Thanks for the suggestion @youssef-el-atmani. But we explain this in the ruby Methods lesson.