4 ms·
<= instead of < would make the first few numbers come out correctly: for(var n=2; n <= Math.floor(Math.sqrt(candidate)); n++)
by quadyeast 10y ago
<= instead of < would make the first few numbers come out correctly:
for(var n=2; n <= Math.floor(Math.sqrt(candidate)); n++)