-
Notifications
You must be signed in to change notification settings - Fork 5
difference
Subhajit Sahu edited this page Mar 17, 2020
·
27 revisions
Gives values of an array not present in another.
array.difference(x, is);
// x: an array
// y: another array
// fn: compare function (a, b)
const array = require('extra-array');
var a = [1, 2, 3, 4, 5];
array.slice$(a, 2);
// [3, 4, 5]
a;
// [3, 4, 5]
var b = [1, 2, 3, 4, 5];
array.slice$(b, 2, 4);
// [3, 4]
b;
// [3, 4]