If you are looking to add or remove options from a select box dynamically, using add and remove methods on select element is the most reliable way. For gory details have a look here:
Extracting Number from String in Alteryx
10 months ago
Designing better user interfaces