Fast Enterprises interview question

How would you go about writing an isPrime function?