Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 348 Bytes

array-includes.md

File metadata and controls

12 lines (11 loc) · 348 Bytes
[0, 1, 2].includes(1); // true
[0, 1, 2].includes('1'); // false
[0, 1, 2].includes(3); // false
[0, 1, 2].includes(0, 1); // false
[1, 2, NaN].includes(NaN); // true
[1, 2, null].includes(null); // true
[1, 2, undefined].includes(undefined); // true
['hello', 'world'].includes('hello'); // true
[{a: 'b'}].includes({a: 'b'}); // false