Write a JavaScript program that removes all elements from the initial array that are of the same value as the following arguments.
Code:
function removeElementsWithValue(arr, ...valsToRemove) {
return arr.filter(el => !valsToRemove.includes(el));
}
var result = removeElementsWithValue([1, 2, 3, 5, 2, 3, 7, 9, 8], 1, 3);
console.log(result);