JSFiddle - React, Tailwind, and code Playground

by rajaadil

HTML

<select name="year">
    <option value="1">First year/option>
    <option value="2">Second year</option>
    <option value="3">Third year</option>
</select>

JavaScript

alert("before remove");
$('[name=year] option').filter(function(){
    return this.value != '3'
}).remove();