- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The double negation(!! ) operator is the! Operator twice and calculates the truth value of a value. It returns a Boolean value, which depends on the truthiness of the expression.
Consider (!!p) as !(!p), here’s an example:
If p is a false value, !p is true, and !!p is false. If p is a true value, !p is false, and !!p is true.
Here’s another example:
0 === false is false. !!0 === false is true. !!0 === false !!parseInt("foo") === false !!1 === true !!-1 === true !!false === false !!true === true
- What is the use of MySQL NOT LIKE operator?
- What is "is not" operator in Python?
- What is the use of MySQL IS and IS NOT operator?
- What is "not in" operator in Python?
- What does 'is not' operator do in Python?
- Double not (!!) operator in PHP
- Why is operator overloading not supported by java?
- What is the use of EXIST and EXIST NOT operator with MySQL subqueries?
- What does 'not in' operator do in Python?
- Is there a “not equal” operator in Python?