What do `return-1` and `return-1` mean in javascript?

What does return! 1 and return-1 mean in

javascript?

May.22,2021

! 1 is false . As for -1 , it is -1


.

! indicates the inverse operation. Js is a weakly typed language, and all non-0 int values are True of Bool values, so ! 1 is the inverse of True , that is, False.

-1 means -1 signed integer


I can see that you are asking questions


comparison function function compare (value1,value2) {if (value1 > value2 return * *-1cm *) else} what does return-1 mean here

Menu