Javascript examples for Operator:Boolean Operator
NOT operator (!) returns true for false statements and false for true statements.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var x = 6;/*from w ww . j av a 2 s . c o m*/ var y = 3; document.getElementById("demo").innerHTML = !(x === y) + "<br>" + !(x > y); </script> </body> </html>