Alright alright...gotta new one for you guys... `....
# suitescript
i
Alright alright...gotta new one for you guys...
.9999>=.2999>.2999
evaluates to
true
s
this is just because true = 1, false = 0 ?
a
@stalbert Correct. console.log(3==3==3) evaluates to false and console.log(3==3==1) evaluates to true
s
I don't have a problem with that.
a
@stalbert I know. I am agreeing with you. 3==3 evaluates to true. So its essentially saying (true ==3) which is false and (true ==1) which is true, for exactly the reason that you said, that 1 evaluates to true and 0 (or any other number for that matter) evaluates to false.
s
yes I guess what I mean is since that follows the rules of the language I don't see it as a 'whoah look at JS' sort of situation. We rely on the left-to-right evaluation of expressions all the time
maybe more than we should 🙂
a
Agreed