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