You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ECMAScript 2022 arrays have new methods like findLastIndex
I assume their handling in ElementaryJS is simply forwarded.
Every once in a while, findLastIndex returns false when looking for an existing array element (it correctly returns -1 when the element does not exist).
MWE (n=100 is sufficiently large to exhibit every few runs):
test("findLastIndex", () => {
let a = [];
for (let i = 0; i < 100; ++i) { a.push(Math.random()); }
for (let i = 0; i < a.length; ++i) {
assert(a.findLastIndex((e, _i, _a) => e === a[i]) !== false);
}
});
The text was updated successfully, but these errors were encountered:
Since ECMAScript 2022 arrays have new methods like findLastIndex
I assume their handling in ElementaryJS is simply forwarded.
Every once in a while, findLastIndex returns
false
when looking for an existing array element (it correctly returns -1 when the element does not exist).MWE (n=100 is sufficiently large to exhibit every few runs):
The text was updated successfully, but these errors were encountered: