<select id="delete">
<option value="1">1</option>
<option value="1">1</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="2">2</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="3">3</option>
<option value="3">3</option>
<option value="3">3</option>
</select>
for(let i of document.querySelectorAll("select")) {
for(let n of i.querySelectorAll("option")) {
if(n.getAttribute("value") == 1) {
n.remove();
} else if(n.getAttribute("value") == 2) {
n.remove();
} else if(n.getAttribute("value") == 3) {
n.remove();
}
}
}
const values = [ '1', '2', '3' ];
[...selectEl].forEach(n => values.includes(n.value) && n.remove());
for (const n of selectEl.querySelectorAll(values.map(n => `[value="${n}"]`))) {
selectEl.removeChild(n);
}
for (let i = selectEl.options.length; i--;) {
const n = selectEl.options[i];
if (values.indexOf(n.value) !== -1) {
n.outerHTML = '';
}
}