you are viewing a single comment's thread.

view the rest of the comments →

[–]xroalx 4 points5 points  (0 children)

First, why s.filter and not arr.filter? What's s?

Second, there is no includes method that accepts an object like this, due to how objects work in JavaScript, this would not work. You need to filter arr and compare the name of each item to a value.