I hereby provide my consent to eMudhra to use my information for signing the document.
Code
Copied!
Generate payload to populate
var primeArray = [];
/*Write a function that checks for primeness andpushes those values to the array*/
function PrimeCheck(candidate){
isPrime = true;
for(var i = 2; i < candidate && isPrime; i++){
if(candidate%i === 0){
isPrime = false;
} else {
isPrime = true;
}
}
if(isPrime){
primeArray.push(candidate);
}