• support@answerspoint.com

What is the !! (not not) operator in JavaScript?

1542

I saw some code that seems to use an operator I don't recognize, in the form of two exclamation points, like so: !!. Can someone please tell me what this operator does?

The context in which I saw this was,

this.vertical = vertical !== undefined ? !!vertical : this.vertical;

0Answer


Your Answer

    Facebook Share        
       
  • asked 8 years ago
  • viewed 1542 times
  • active 8 years ago

Best Rated Questions