Want to receive Question of the Day updates? Subscribe Here
JavaScript Question of the Day
April 1, 2025
IncorrectCorrectNo Answer was selectedInvalid Answer
Consider the following program:
functionmain(){for(let i =1; i <=10; i++){if(mystery(i)){
console.log(i);}}}functionmystery(num){if(num <=1){returnfalse;}if(num <=3){returntrue;}if(num %2==0|| num %3==0){returnfalse;}for(let i =5; i * i <= num; i = i +6){if(num % i ==0|| num %(i +2)==0){returnfalse;}}returntrue;}main();