I have this select in Pug/Jade
select.form-select.col-xs-12.col-sm-12(id='selState1', onClick='+setState(selState1.value)')
option(value='selState1', name='selState1',id='selState1') Enter state
each state in nigeria.states()
option(value='state') #{state}
Now I need to use the value of the selected option as a parameter in function nigeria.lgas() that generates the options for another select
I have done
select.form-select.col-xs-12.col-sm-12(id='selLG1', name='selLG1')
option.active(value='selLG') Enter Local Government
each lg in nigeria.lgas(selState1.value)
option(value=lg) #{lg}
I get the error 'selState1 is not defined'
selState1.value
withselLG1.value
?