I get the fact that it's an easy concept. The lab my teacher wanted us to construct is a random phone number generator.

The area code has to be 218, 312, or 731, it can't be anything else. He told us that we can use Math.random() for this method, but I cannot think of a way how the computer can generate those numbers unless there's an if statement. Any help? I'll post my code if needed. I just don't know the concept I am supposed to use.