- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain about logical not(!) operator in detail with example in javascript?
NOT operator
The logical NOT operator gives true for false values and false for true values.
Example
<html> <body> <p id="logical"></p> <script> var x = 200; var y = 300; document.getElementById("logical").innerHTML = !(x < y) + "<br>" + !(x > y); </script> </body> </html>
Output
false true
Advertisements