AS
const arg = Array.from(arguments)
const arg2 = arg.slice(1)
return console.log(arr.filter(x => arg2[x] != x));
}
destroyer([1,2,3,4,5,6], 2,3) по идее должно вернуть массив без 2 и 3
Size: a a a
AS
C
C
fn destroyer(arr, ...rest) {
return arr.filter(x => !rest.includes(x))
}
AS
fn destroyer(arr, ...rest) {
return arr.filter(x => !rest.includes(x))
}
C
DM
C
destroyer([1,2,3,4,5], null, null, 2, 3)
C
OH
destroyer([1,2,3,4,5], null, null, 2, 3)
C
C
C
C
OH
OH
I
K
OH
destroyer([1,2,3,4,5], null, null, 2, 3)