Skip to content
Advertisement

How Can I Make a Loop of two arrays with some rules

I need some help

I have two arrays:

First array have Boolean elements. (It’s true when button is active , and false if not)
The second one strings where “0”(active) or “1” (inactive).

JavaScript

To understand better , PaintBall have grupo(group), indoor, outdoor and natureza(nature) activated. The rest are inactive. Like this

JavaScript

What I need it’s the following but of course with another solution:

JavaScript

When a element from the first array is true and the same position of the second is == “1” , return something.

Example

In this example image , I Want to show the images that have those 3 tables (outdoor, aquatico and natureza with value “1”);

Advertisement

Answer

Already solved Thanks for the help!

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