verify prime number
How to verify a prime number in javascript ?
verify prime number
How to verify a prime number in javascript ?
verify a prime number
function isPrime(n){
var divisor = 2;
while (n > divisor){
if(n % divisor == 0){
return false;
}
else
divisor++;
}
return true;
}
> isPrime(137);
= true
> isPrime(237);
= false
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us