Fast Enterprises interview question

Coding question: write function isPrime and explain your process