1

I have a method like this in React:

save(){
  let po=pd=idv=false;
  //some logic to set po,pd, and idv true if meets a condition
}

Whenever this method is called, it always says "Uncaught ReferenceError : idv is undefined." What am I doing wrong?

Super Jade
  • 5,609
  • 7
  • 39
  • 61

1 Answers1

1

This might solve the problem

save() {
 let po,pd,idv;
 po = pd = idv = false;
}