| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes | [Back] [Original] |
Get to know MDN better
includes() TypedArray true false Array.prototype.includes()
const uint8 = new Uint8Array([10, 20, 30, 40, 50]);
console.log(uint8.includes(20));
// : true
// Check from position 3
console.log(uint8.includes(20, 3));
// : false
includes(searchElement)
includes(searchElement, fromIndex)
fromIndex searchElement true
const uint8 = new Uint8Array([1, 2, 3]);
uint8.includes(2); // true
uint8.includes(4); // false
uint8.includes(3, 3); // false
// NaN
new Uint8Array([NaN]).includes(NaN); // false ( NaN 0 )
new Float32Array([NaN]).includes(NaN); // true
| ECMAScript 2027 LanguageSpecification # sec-%typedarray%.prototype.includes |
| Web Proxy Viewer | New URL | Original Page |