check Enter number positive or negative in javascript

technical talkiess
0

 check Enter number positive or  negative  in javascript


<script>

const number = prompt("enter the number");

if(number >0){

alert("number is positive");

}else if(number == 0){

alert("number is 0");

}else{

alert("number is negative");

}

</script>

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)