Update sive.js

This commit is contained in:
The Ghost of FOSS' Past 2024-10-21 21:47:03 +00:00
parent faf3952738
commit 996c3f9051

View file

@ -1,7 +1,6 @@
const readline = require("readline");
const { stdin: input, stdout: output } = require('node:process');
let primes = []
const isPrime = num => {
@ -16,7 +15,6 @@ const rl = readline.createInterface({ input, output });
rl.question('Sive to: ', (siveTo) => {
siveTo = Number(siveTo)
for (var i = 1; i < siveTo; i++) {
if (isPrime(i)) {
primes.push(i)