following adds items to array:
var arrayOptions = []; function AddToFilterOptionList(mode) { arrayOptions.push(mode); }
remove item fr
Cycle through the Array and then use the startsWith method.
void AddToFilterOptionList(String mode) { for (i=0; i