โ† All coding problems

Prime check

EasyMaths

Return true if n is a prime number, otherwise false. 0 and 1 are not prime.

Function
function solve(n)
Example 1
n = 7
โ†’ true

Submit also runs 5 hidden tests, including edge cases.

console.log output is shown below