Skip to content
Advertisement

i try to delete a index from an array javascript, but its not working

here is my code

JavaScript

I want to remove indexs from subjectData which is exist in eachStudent.subjectName

and when i console el.name and v I found that one el is similar but always return -1

Plz help

Advertisement

Answer

It’s so much easier to do this with a one liner using filter:

JavaScript

Here’s a working stackblitz:

https://stackblitz.com/edit/js-tly2yl

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement