Remove elements contained in another array

Hi guys,
I have two arrays: [1,4,7] and [1,2,3,4,5,6,7,8,9,10]. However, I would like to remove the elements in the second array based on the first one.
In this case, the result would be 2,3,5,6,8,9,10.
Anyone knows how this can be accomplished?

function removeRooms(reserved) {
const cuartos = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
for ( var i = cuartos.length - 1; i >= 0; i–) {
if (cuartos[i] === reserved) {
cuartos.splice(i, 1);
return [… new Set(cuartos)];
}
}
}

I figured it out:

function removeRooms(reserved){
var a1 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17];
var a2 = reserved
var a = [], diff = [];
for ( var i = 0; i < a1.length; i++) {
a[a1[i]] = true ;
}
for ( var i2 = 0; i2 < a2.length; i2++) {
if (a[a2[i2]]) {
delete a[a2[i2]];
} else {
a[a2[i2]] = true ;
}
}
for ( var k in a) {
diff.push(k);
}

return diff;
}