JS Coding Questions Logo
JS Coding Questions
#137💼 Interview

Is the !-- notation represents a special operator

Advertisement

728x90

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.

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 53

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
137of476