P
P
Pipop2020-06-09 13:01:10
JavaScript
Pipop, 2020-06-09 13:01:10

How to make filtering work?

https://codepen.io/GunAlv/pen/MWKaZrm
In the filter() function, the working sections of the code are commented out: one filters the labels in accordance with the "fuel type" checkboxes, and the other - with "objects". The problem is that I can't figure out how to combine the results of these filters, they work separately. So, for example, there are two stores (objects) and one of them has two types of fuel, and the other two other types.
Help me please. I do not quite understand the process of combining filters. Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Epikhin, 2020-06-09
@Pipop

You combined everything correctly, only on line 213 you forgot to add parentheses. You should have 2 expressions that are combined through &&, and you have 4 independent expressions. Hence the incorrect work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question