0 votes
in JavaScript by
Is the !-- notation represents a special operator in Javascript?

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Sep 29, 2023 in JavaScript by JackTerrance
0 votes
asked Oct 26, 2023 in JavaScript by DavidAnderson
...