mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibJS: Treat missing arg in Array.prototype.includes() as undefined
This commit is contained in:
parent
fbcfc8dcd0
commit
5db9becc4a
2 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,8 @@ try {
|
|||
|
||||
var array = ['hello', 'friends', 1, 2, false];
|
||||
|
||||
assert([].includes() === false);
|
||||
assert([undefined].includes() === true);
|
||||
assert(array.includes('hello') === true);
|
||||
assert(array.includes(1) === true);
|
||||
assert(array.includes(1, -3) === true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue