We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9913e3 commit 3c81e0eCopy full SHA for 3c81e0e
is_prime/js/is_prime.js
@@ -0,0 +1,8 @@
1
+function isPrime(number){
2
+ let x = number -1;
3
+ while(x > 1){
4
+ if((number % x)== 0) return false;
5
+ x--;
6
+ }
7
+ return true;
8
+}
0 commit comments