Is the !– notation represents a special operator

Posted by Andre Scott | Updated on

No,that’s not a special operator. But it is a combination of 2 standard operators one after the other,

  1. A logical not (!)
  2. A prefix decrement (–)

At first, the value decremented by one and then tested to see if it is equal to zero or not for determining the truthy/falsy value.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers