Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodejs/node
/ is_prime
Function
is_prime
deps/v8/test/js-perf-test/Compiler/medium.js:45–50 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
43
}
44
45
function
is_prime() {
46
for
(
let
i = 2; i <= Math.sqrt(a); i++) {
47
if
(a % i == 0)
return
false;
48
}
49
return
true;
50
}
51
52
function
eratosthenes(max) {
53
let
nums =
new
Array(max).fill(false);
Callers
1
medium.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected