https://github.com/v8/v8/blob/main/src/parsing/scanner-inl.h...
and
https://github.com/v8/v8/blob/main/src/parsing/scanner.cc#L3...
And also this nice article:
"The scanner chooses a specific scanner method or token based on a maximum lookahead of 4 characters, the longest ambiguous sequence of characters in JavaScript"
Then again, I'd be even more horrified if the above statement is not true anyways.
Of course, because javascript, there are other string values of `f` for which the two statements are equal as well. (e.g for empty string both statements are true because `-"" === -0`, and for "1" both values are false)
f = 0 (type: object, constructor: Number)
0<!f = false
0<!-f = truehttps://dorey.github.io/JavaScript-Equality-Table/
I particularly like the note on the "if" tab:
> Note: This row does not match up with any of the rows in the other table.
No, it is less-than-not, not less-than-or-not-equal-to.
That is <!x is the same as < (!x); if x is true-ish, it is “< false” and if x is false-ish it is “< true”.
Can it maybe shut off if it detects strict mode or something? Seems wild to find this behavior in Node and evergreen browsers.