2
Name(value, check) {
 
    if (Method === true) {
      const se = [...this.state.select];
      select.push(newValue);
      this.setState({
        select
      });
    } else {
      const select = [...this.state. select];
      selectedObjective.pop(newValue);
      this.setState({
        select
      });
    }
  }

in here I'm pushing value to the array.. when I remove the element from the array. only the last element getting pop out, how can I pop according to the value or specific value other than popping out last?

Prash
  • 23
  • 3

0 Answers0