Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

javascript

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

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

like image 712
diao Yerik Avatar asked Aug 26 '16 09:08

diao Yerik


People also ask

What does <= mean in JavaScript?

The less than or equal operator ( <= ) returns true if the left operand is less than or equal to the right operand, and false otherwise.

What is ___ operator in JavaScript?

JavaScript +_ operator: It is a combination of the variable with symbol underscore( _ ) and unary plus ( + ) operator, + operator converts the type of _ variable to Number type for further operation. Example: The variable “_” with string type is stored in variable “r” with “number” type.

Whats the difference between += and =+?

+ is an arithmetic operator while += is an assignment operator.. When += is used, the value on the RHS will be added to the variable on the LHS and the resultant value will be assigned as the new value of the LHS..


1 Answers

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

like image 173
deceze Avatar answered Nov 01 '22 19:11

deceze