4 ms·
Indeed, and as others have stated it is really hard to allow `[-1]` without breaking old code. Also: `[1, NaN, "hi"].indexOf(NaN)` is -1 but `.includes(NaN)` r
by NicolaiS 5y ago
Indeed, and as others have stated it is really hard to allow `[-1]` without breaking old code.
Also: `[1, NaN, "hi"].indexOf(NaN)` is -1 but `.includes(NaN)` returns true as expected.
- nawgz 5y ago> `[1, NaN, "hi"].indexOf(NaN)` is -1 but `.includes(NaN)` returns true Brutal.