LibJS: Call Array.prototype.find() callback for empty elements

If the array value at the current index is empty, the callback will
be called with undefined as value.
This commit is contained in:
Linus Groh 2020-04-28 18:08:01 +01:00 committed by Andreas Kling
commit 823cc7bc1c
Notes: sideshowbarker 2024-07-19 07:13:05 +09:00
3 changed files with 27 additions and 7 deletions

View file

@ -9,7 +9,7 @@ try {
callbackCalled++;
a.pop();
});
assert(callbackCalled === 3);
assert(callbackCalled === 5);
callbackCalled = 0;
a = [1, 2, 3, 4, 5];