- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Is the !! (not not) operator in JavaScript equivalent to reverse process of not operator?
Yes, the not not operator is the reverse process of not operator. If any value is true then single ! (not) will return false and !! will return opposite value (true).
The not operator −
var flag=true; console.log(!flag);
The not not operator −
var flag=true; console.log(!!flag);
Example
Following is the code −
var flag=true; console.log("The result of single !=") console.log(!flag); console.log("The result of single !!=") console.log(!!flag)
To run the above program, you need to use the following command −
node fileName.js.
Here, my file name is demo247.js
Output
This will produce the following output on console −
PS C:\Users\Amit\javascript-code> node demo247.js The result of single != false The result of single !!= True
- Related Articles
- What is the !! (not not) operator in JavaScript?
- What is JavaScript Bitwise NOT(~) Operator?
- What is Logical NOT Operator (!) in JavaScript?
- What is Bitwise NOT Operator (~) in JavaScript?
- What is "is not" operator in Python?
- Double not (!!) operator in PHP
- What is "not in" operator in Python?
- Is their JavaScript “not in” operator for checking object properties?
- What is the use of MySQL NOT LIKE operator?
- Is there a “not equal” operator in Python?
- MySQL syntax not evaluating with not equal operator in presence of null?
- What is the use of MySQL IS and IS NOT operator?
- Why is operator overloading not supported by java?
- Explain about logical not(!) operator in detail with example in javascript?
- What does 'is not' operator do in Python?

Advertisements