diao Yerik diao Yerik - 3 months ago 9
Javascript Question

How does the minus minus less than "-->" operator work in JavaScript?

while (max --> min)
{
console.log(n);
}


I know that
-->
decreases the value, but where is
-->
documented in the official documentation?

Answer

It is the post decrement operator -- followed by the greater than operator >. Just the spacing is weird.

while (max-- > min)

So, while max decremented is larger than min

Comments