Hi, I can't figure out what I'm doing wrong here. It must be the simplest thing, but the script is meant to add asterisks only after the numbers 1, 2, or 3. Instead it is appending one to each number.
Please help.
<SCRIPT LANGUAGE="JavaScript">
var number=1;
var is1or2or3;
function checkIf1or2or3(n){
if (n==1||n==2||n==3){is1or2or3=true;}
else {is1or2or3=false;}
}
while (number<=10)
{
document.write(number);
checkIf1or2or3(number);
if (is1or2or3=true){document.write("*");}
document.write("</br>");
number++;
}
</script>