Fast Enterprises Interview Question

How to code a function to find prime numbers.