Elemente aus dem ersten Array, die sich nicht im zweiten Array JavaScript befinden
let difference = arrA.filter(x => !arrB.includes(x));
Adventurous Ant
let difference = arrA.filter(x => !arrB.includes(x));
const longArray = [1, 2, 3, 4, 5, 6, 7]
// to show only first 4 elements
const shortArray = longArray.slice(0,4) // slice(startIndex, numberOfSteps)
console.log(longArray) // [1, 2, 3, 4, 5, 6, 7]
console.log(shortArray) // [1, 2, 3, 4]
const slicedArray = array.slice(0, n);
const sliced_array = unsliced_array.slice(0, n);