I have several arrays that are built similar to this:
exampleArray=new array(
"A01 - Blah Blah Blah",
"A01A - Blah Blah Blah Blah")
I'm using these Arrays to populate options in a form and I need to strip out everything after the first space(i.e. " - Blah Blah Blah") for the values of a given option. The options and values are currently being generated with this code:
for(i=0; i<optionStepTwo.length; i++) {
elementStepTwo.options[elementStepTwo.options.length] =
new Option(optionStepTwo[i], optionStepTwo[i]);
};
var x = [['A01', 'blahblahblah'], ['a01a', 'blahblah']];which'd makex[1][0]bea01a.