Javascript program to find number of prime numbers in a subarray and performing updates
let MAX = 1000 ; function sieveOfEratosthenes ( isPrime ) { isPrime [ 1 ] = false ; for ( let p = 2 ; p * p <= MAX ; p ++ ) {