-
Notifications
You must be signed in to change notification settings - Fork 5
includes
Subhajit Sahu edited this page Nov 20, 2022
·
16 revisions
Check if array has a value.
function includes(x, v, i)
// x: an array
// v: search value
// i: start index [0]
const array = require('extra-array');
var x = [1, 2, -3];
array.includes(x, 3);
// → false
array.includes(x, -3);
// → true