Finding prime numbers upto 10000 using Sieve of Eratosthenes
let allPrimes = sieve ( 10000 ) ; let arr = [ ] ; arr . push ( 15 ) ; arr . push ( 30 ) ; arr . push ( 60 ) ; let ans = distPrime ( arr , allPrimes ) ; document . write ( " " ) ; for ( let i = 0 ; i < ans . length ; i ++ ) document . write ( ans [ i ] + " " ) ; document . write ( " " ) ;