Skip to content

Commit d568da1

Browse files
authored
Update TwinPrime.js
1 parent c78fdcd commit d568da1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Maths/TwinPrime.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ function twinPrime (n) {
2020
if (!prime) {
2121
return []
2222
}
23-
23+
2424
result.push(n)
25-
25+
2626
if (!isPrime(n + 2)) {
2727
return []
2828
}
29-
29+
3030
result.push(n + 2)
31-
31+
3232
return result
3333
}
34+
35+
export { isPrime, twinPrime }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy