I am trying to change the filterName
value on onclick of the filter button, but while being inside the showFilter function
, the value is changing but when I console.log()
it outside the showFilter function
then it did not have any value its showing that the variable is empty, like how it was before getting into the function, please help me out