I have a large list of items in a drop down ~30. Based on the selection I need to generate some options. I can do this several ways but figure there has to be a better way.
My first thought is:
var a = dropdownList1.rawValue
if (a == "Option1" || a == "Option2" || etc){
then do something
}
else
if(a == "Category1" || a== "Category2" etc){
then do something else
}
I can also use a case statement but cannot find a way to say:
case "Option1" || "Option 2"
This would leave me with
case "Option1
this.rawValue = ??
break
case "Option 2
There has to be a better way. I am thinking I could use an array but not sure what the syntax would be