Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

( if steatmetn), even if the value is null when I click the button it delete the items

in the if statement, even if the value is null, when I click the button, it is still deleting the item which is in the array. I would be happy if you guys help, I have no idea.

[1]:

here is the picture https://i.stack.imgur.com/0Pm5K.png

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need to remove comparison with null, I mean next:

if(dele){
   ....
} else {
   alert('Put a value');
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading