Home
<!DOCTYPE html> <html> <body> <h1>Demo: if condition</h1> <script> var mySal = 1000; var yourSal = 500; if( mySal > yourSal) { alert("My Salary is greater than your salary"); } </script> </body> </html>
Result: