Replying to @ojrdev @BrendanEich
Check out section 7.2.13 of the ECMAScript spec, discussing Abstract Relational Comparisons: tc39.es/ecma262/#sec-abstrac…. Sections 7.1.3 and 7.1.4 cover conversion of non-number types (e.g. booleans) into numbers. False is converted into 0 (specifically, +0). Hope this helps!
0
0
2
1/
Headline aside, I did almost all the core language design in ten days in May. But as caution to others I will repeat that == was strict at first; I made it sloppy only after the demo, on requests from early inside-Netscape adopters (same group wanted ‘with’). Lesson: just say no!
1
0
1
It can’t be changed. “When there is no solution, there is no problem” (James Burnham, IIRC) — but there are solutions: @geteslint @StandardJS @typescript @flowtype etc.

4:06 PM · Dec 11, 2020

0
1
3