Fast Enterprises Interview Question

How would you go about writing an isPrime function?