Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i am not getting alert if the entered number exceeds 400. can you please help me in getting the output.

What I have tried:

i tried if and else statement. i dont know how to use print alert
Posted
Updated 21-Oct-21 1:34am
Comments
Patrice T 21-Oct-21 7:05am    
Try to show your code.

1 solution

JavaScript
  function showmessage() {
    alert("this is the alert message");
  }
// or
  function showmessage(message) {
    alert(message);
  }

if (number > 400) {
  showmessage("The number is greater than 400");
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900