FrontendDeveloper.in

JavaScript question detail

Is the !-- notation represents a special operator

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.

Back to all JavaScript questions
Get LinkedIn Premium at Rs 399