var num=8;
var isPrimeT=true;
var iw=2;
while(iw<isPrimeT){
if(num%iw==0){
isPrimeT=false;
break;
}
iw++;
}
if(isPrimeT==false){
console.log(num+" is not a prime number");
}
else{
console.log(num+" is a prime number");
}
Is there anything wrong? it does not show the correct answer. When I input the variable "num", it only shows num+"is a prime number".