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.
2 parents c73ef9d + 3c81e0e commit a0e5456Copy full SHA for a0e5456
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