I have a variable containing the options of a select element:
var allOptions = document.getElementById('ddl').options;
When I am removing the options
var selector = document.getElementById('ddl');
selector.options.length = 0;
the options in allOptions are also removed. 
How can I avoid that?
 
     
    