Introduction to Methods in Ruby
Learn about methods in Ruby and their significance.
We'll cover the following...
Code refactoring
When constructing a solution for finding the HCF of two numbers, we need first to find the divisors of both numbers. In the following code, which gets the divisors for two input numbers, we can see the two code fragments that are almost identical.
Identical codes
Access this course and 1400+ top-rated courses and projects.