← all problems

isPrime 🌶️🌶️

Write a method that takes one int parameter, n, and returns true if it's a prime number, or false otherwise. A number is prime if it's not evenly divisible by any integer other than 1 and itself. You can assume n is always 2 or greater.