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 e7bbcd9 commit e8d0b69Copy full SHA for e8d0b69
isPrime.js
@@ -0,0 +1,8 @@
1
+const isPrime = (num) => {
2
+ if(num < 2) return false;
3
+
4
+ for(let i=2; i<num; i++){
5
+ if(num % i === 0) return false
6
+ }
7
+ return true
8
+}
0 commit comments