JSFiddle - React, Tailwind, and code Playground

HTML

<select id='test'>
<option value=10>10</option>
<option value=20>20</option>
<option value=30>30</option>
</select>

<select id='cupcake-amt'>
<option value='1'>1</option>
</select>

JavaScript

$('#test').change(function(){
    $('#cupcake-amt').empty(); // <-- empty the select box - so it removes the 50
    var x = '';  // <-- variable to store option string
    x += '<option val="Choose..." disabled selected>Choose...</option>';
    x += '<option val="Younger than 10">Younger than 10</option>';
  
    x += '<option val="Older than 100">Older than 100</option>';
    $('#cupcake-amt').append(x); 
});