JavaScript, Javascript Tips, Interview Questions, Datastrucutre, Javascript Interview.
i++) { if(inputNum%i === 0) result = false; break; } return result; } console.log(isPrime(17)); console.log(isPrime(18)); 7. Write a program to check whether the number is perfect or not? Prime number: whose SUM of all the factors is equal to the expected value, the value of the factor itself.