In this guide you’ll learn how to find divisible numbers by leveraging Ruby’s detect method.
Build a method that finds the first divisible number of two integers.
Given two integers, build a method that returns the first number that is divisible by both numbers.
Given the numbers:
Real World Usage
Finding divisible numbers is a common coding interview question. Additionally, it’s an important concept when working with mathematical equations.
Can be found on the solutions branch on github.